private RegionDistributionException createRegionDistributionException() { String s = "MyString"; String regionFullPath = "MyPath"; Set missingRoles = createSetOfRoles(); return new RegionDistributionException(s, regionFullPath, missingRoles); }
/** * Called when we do a distributed operation and don't have anyone to distributed it too. Since * this is only called when no distribution was done (i.e. no recipients) we do not check * isMissingRequiredRoles because it might not longer be true due to race conditions * * @return false if this region has at least one required role and queuing is configured. Returns * true if sending to no one is ok. * @throws RoleException if a required role is missing and the LossAction is either NO_ACCESS or * LIMITED_ACCESS. * @since GemFire 5.0 */ boolean isNoDistributionOk() { if (this.requiresReliabilityCheck) { MembershipAttributes ra = getMembershipAttributes(); Set<Role> failedRoles = ra.getRequiredRoles(); throw new RegionDistributionException( String.format("Operation distribution was not done to these required roles: %s", failedRoles), getFullPath(), failedRoles); } return true; }
throw new RegionDistributionException( String.format("Operation distribution may have failed to notify these required roles: %s", failedRoles),