org.apache.jcs.auxiliary.remote
Class RemoteCacheRestore
java.lang.Object
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 succesful, the status of the manager changes. When the failover runner
finds that the primary is in good shape, it will switch back.
- Author:
- asmuts
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 |
log
private static final org.apache.commons.logging.Log log
rcm
private final RemoteCacheManager rcm
canFix
private boolean canFix
remoteObj
private java.lang.Object remoteObj
RemoteCacheRestore
public RemoteCacheRestore(RemoteCacheManager rcm)
- Constructs with the given instance of RemoteCacheManager.
- Parameters:
rcm
-
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
fix
public void fix()
- Fixes up all the caches managed by the associated cache manager.
- Specified by:
fix
in interface ICacheRestore