/** * Returns true if the ExpiryTask is currently allowed to expire. * <p> * If the region is in NO_ACCESS due to reliability configuration, then no * expiration actions are allowed. * <p> * If the region is in LIMITED_ACCESS due to reliability configuration, then * only non-distributed expiration actions are allowed. */ @Override protected boolean isExpirationAllowed(ExpiryTask expiry) { if (this.requiresReliabilityCheck && this.isMissingRequiredRoles) { if (getMembershipAttributes().getLossAction().isNoAccess()) { return false; } if (getMembershipAttributes().getLossAction().isLimitedAccess() && expiry.isDistributedAction()) { return false; } } return true; }
/** * Returns true if the ExpiryTask is currently allowed to expire. * <p> * If the region is in NO_ACCESS due to reliability configuration, then no * expiration actions are allowed. * <p> * If the region is in LIMITED_ACCESS due to reliability configuration, then * only non-distributed expiration actions are allowed. */ @Override protected boolean isExpirationAllowed(ExpiryTask expiry) { if (this.requiresReliabilityCheck && this.isMissingRequiredRoles) { if (getMembershipAttributes().getLossAction().isNoAccess()) { return false; } if (getMembershipAttributes().getLossAction().isLimitedAccess() && expiry.isDistributedAction()) { return false; } } return true; }