/** * returns a DistributedStateCache object that provides the ability to * set and retrieve CachedStates. * * @return DistributedStateCache * @see com.sun.enterprise.ee.cms.core.DistributedStateCache */ public DistributedStateCache getDistributedStateCache() { // TBD: code review comment to follow up on in future. // consider an empty no-op DistributedStateCache instead of null when member type is WATCHDOG. // makes code cleaner not to have to check for null or isWatchdogy() all over. if (isWatchdog()) { return null; } return getGMSContext().getDistributedStateCache(); }
/** * returns a DistributedStateCache object that provides the ability to * set and retrieve CachedStates. * * @return DistributedStateCache * @see com.sun.enterprise.ee.cms.core.DistributedStateCache */ public DistributedStateCache getDistributedStateCache() { // TBD: code review comment to follow up on in future. // consider an empty no-op DistributedStateCache instead of null when member type is WATCHDOG. // makes code cleaner not to have to check for null or isWatchdogy() all over. if (isWatchdog()) { return null; } return getGMSContext().getDistributedStateCache(); }
private void removeRecoveryAppointments( final Map<GMSCacheable, Object> fromCache, final String failedMemberToken, final String componentName) throws GMSException { if (isWatchdog()) { return; } final DistributedStateCache dsc = getGMSContext() .getDistributedStateCache(); for (final Map.Entry<GMSCacheable, Object> entry : fromCache.entrySet()) { final GMSCacheable cKey = entry.getKey(); if (cKey.getKey().equals(failedMemberToken) && cKey.getComponentName().equals(componentName) && entry.getValue().toString().startsWith(REC_APPOINTED_STATE)) { if (logger.isLoggable(Level.FINE)){ logger.log(Level.FINE, "remove RecoveryAppointment componentName: " + componentName + " failedMember:" + failedMemberToken + "value=" + entry.getValue().toString()); } dsc.removeFromCache(cKey.getComponentName(), cKey.getMemberTokenId(), (Serializable) cKey.getKey()); } } }
private void forceDSCSync(final DistributedStateCacheImpl dsc) { if (isWatchdog()) { return; } try { final String token = getGMSContext().getGroupCommunicationProvider() .getGroupLeader(); if (logger.isLoggable(Level.FINE)){ logger.log(Level.FINE, "Force Syncing DistributedStateCache with " + token); } dsc.syncCache(token, true); } catch (GMSException e) { logger.log(Level.WARNING,"gh.dsc.force.sync.failed", new Object[]{e.getLocalizedMessage()}); } }
private void forceDSCSync(final DistributedStateCacheImpl dsc) { if (isWatchdog()) { return; } try { final String token = getGMSContext().getGroupCommunicationProvider() .getGroupLeader(); if (logger.isLoggable(Level.FINE)){ logger.log(Level.FINE, "Force Syncing DistributedStateCache with " + token); } dsc.syncCache(token, true); } catch (GMSException e) { logger.log(Level.WARNING,"gh.dsc.force.sync.failed", new Object[]{e.getLocalizedMessage()}); } }
private void removeRecoveryAppointments( final Map<GMSCacheable, Object> fromCache, final String failedMemberToken, final String componentName) throws GMSException { if (isWatchdog()) { return; } final DistributedStateCache dsc = getGMSContext() .getDistributedStateCache(); for (final Map.Entry<GMSCacheable, Object> entry : fromCache.entrySet()) { final GMSCacheable cKey = entry.getKey(); if (cKey.getKey().equals(failedMemberToken) && cKey.getComponentName().equals(componentName) && entry.getValue().toString().startsWith(REC_APPOINTED_STATE)) { if (logger.isLoggable(Level.FINE)){ logger.log(Level.FINE, "remove RecoveryAppointment componentName: " + componentName + " failedMember:" + failedMemberToken + "value=" + entry.getValue().toString()); } dsc.removeFromCache(cKey.getComponentName(), cKey.getMemberTokenId(), (Serializable) cKey.getKey()); } } }
if (isWatchdog()) { return false;
if (isWatchdog()) { return false;
final String failedMemberToken) throws GMSException { //If there is a fence for delegated recovery or self recovery if (isWatchdog()) { return;
final String failedMemberToken) throws GMSException { //If there is a fence for delegated recovery or self recovery if (isWatchdog()) { return;
final String failedMemberToken) throws GMSException { if (isWatchdog()) { return;
final String failedMemberToken) throws GMSException { if (isWatchdog()) { return;