org.apache.jcs.auxiliary.remote
Class RemoteCacheRestore

java.lang.Object
  extended by org.apache.jcs.auxiliary.remote.RemoteCacheRestore
All Implemented Interfaces:
ICacheRestore

public class RemoteCacheRestore
extends java.lang.Object
implements ICacheRestore

Used to repair the remote caches managed by the associated instance of RemoteCacheManager.

When there is an error the monitor kicks off. The Failover runner starts looks for a manager with a connection to a remote cache that is not in error. If a manager's connection to a remote cache is found to be in error, the restorer kicks off and tries to reconnect. When it is successful, the status of the manager changes.

When the failover runner finds that the primary is in good shape, it will switch back. Switching back involves setting the first no wait on the no wait facade.


Constructor Summary
RemoteCacheRestore(RemoteCacheManager rcm)
          Constructs with the given instance of RemoteCacheManager.
 
Method Summary
 boolean canFix()
          Returns true if the connection to the remote host for the corresponding cache manager can be successfully re-established.
 void fix()
          Fixes up all the caches managed by the associated cache manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteCacheRestore

public RemoteCacheRestore(RemoteCacheManager rcm)
Constructs with the given instance of RemoteCacheManager.

Parameters:
rcm -
Method Detail

canFix

public boolean canFix()
Returns true if the connection to the remote host for the corresponding cache manager can be successfully re-established.

Specified by:
canFix in interface ICacheRestore
Returns:
true if we found a failover server

fix

public void fix()
Fixes up all the caches managed by the associated cache manager.

Specified by:
fix in interface ICacheRestore


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.