/** Main processing method for the RemoteCacheMonitor object */ @Override public void doWork() { // Monitor each RemoteCacheManager instance one after the other. // Each RemoteCacheManager corresponds to one remote connection. for (RemoteCacheManager mgr : managers.values()) { // If we can't fix them, just skip and re-try in // the next round. if ( mgr.canFixCaches() ) { mgr.fixCaches(); } else { allright.set(false); } } } }
/** * Fixes up all the caches managed by the associated cache manager. */ @Override public void fix() { if ( !canFix ) { return; } remoteCacheManager.fixCaches( (ICacheServiceNonLocal<?, ?>) remoteObj, (ICacheObserver) remoteObj ); if ( log.isInfoEnabled() ) { String msg = "Remote connection to " + RemoteUtils.getNamingURL(remoteCacheManager.host, remoteCacheManager.port, remoteCacheManager.service) + " resumed."; remoteCacheManager.logApplicationEvent( "RemoteCacheRestore", "fix", msg ); log.info( msg ); } } }