Methods Summary |
---|
public org.apache.catalina.ha.ClusterManager | cloneFromTemplate()
BackupManager result = new BackupManager();
result.mExpireSessionsOnShutdown = mExpireSessionsOnShutdown;
result.name = "Clone-from-"+name;
result.cluster = cluster;
result.notifyListenersOnReplication = notifyListenersOnReplication;
result.mapSendOptions = mapSendOptions;
return result;
|
public org.apache.catalina.Session | createEmptySession()
return new DeltaSession(this);
|
public boolean | doDomainReplication()
return false;
|
public java.lang.ClassLoader[] | getClassLoaders()
return ClusterManagerBase.getClassLoaders(this.container);
|
public org.apache.catalina.ha.CatalinaCluster | getCluster()
return cluster;
|
public boolean | getDistributable()
return distributable;
|
public boolean | getExpireSessionsOnShutdown()
return mExpireSessionsOnShutdown;
|
public java.lang.String[] | getInvalidatedSessions()
return new String[0];
|
public java.lang.String | getMapName()
CatalinaCluster catclust = (CatalinaCluster)cluster;
String name = catclust.getManagerName(getName(),this)+"-"+"map";
if ( log.isDebugEnabled() ) log.debug("Backup manager, Setting map name to:"+name);
return name;
|
public int | getMapSendOptions()
return mapSendOptions;
|
public java.lang.String | getName()
return this.name;
|
public org.apache.catalina.tribes.io.ReplicationStream | getReplicationStream(byte[] data)Open Stream and use correct ClassLoader (Container) Switch
ThreadClassLoader
return getReplicationStream(data,0,data.length);
|
public org.apache.catalina.tribes.io.ReplicationStream | getReplicationStream(byte[] data, int offset, int length)
ByteArrayInputStream fis = new ByteArrayInputStream(data, offset, length);
return new ReplicationStream(fis, getClassLoaders());
|
public boolean | isDefaultMode()
return false;
|
public boolean | isNotifyListenersOnReplication()
return notifyListenersOnReplication;
|
public void | messageDataReceived(org.apache.catalina.ha.ClusterMessage msg)
|
public org.apache.catalina.ha.ClusterMessage | requestCompleted(java.lang.String sessionId)
if ( !this.started ) return null;
LazyReplicatedMap map = (LazyReplicatedMap)sessions;
map.replicate(sessionId,false);
return null;
|
public void | setCluster(org.apache.catalina.ha.CatalinaCluster cluster)
if(log.isDebugEnabled())
log.debug("Cluster associated with SimpleTcpReplicationManager");
this.cluster = cluster;
|
public void | setDefaultMode(boolean defaultMode)
|
public void | setDistributable(boolean dist)
this.distributable = dist;
|
public void | setDomainReplication(boolean sendClusterDomainOnly)
|
public void | setExpireSessionsOnShutdown(boolean expireSessionsOnShutdown)
mExpireSessionsOnShutdown = expireSessionsOnShutdown;
|
public void | setMapSendOptions(int mapSendOptions)
this.mapSendOptions = mapSendOptions;
|
public void | setName(java.lang.String name)
this.name = name;
|
public void | setNotifyListenersOnReplication(boolean notifyListenersOnReplication)
this.notifyListenersOnReplication = notifyListenersOnReplication;
|
public void | start()Prepare for the beginning of active use of the public methods of this
component. This method should be called after configure() ,
and before any of the public methods of the component are utilized.
Starts the cluster communication channel, this will connect with the other nodes
in the cluster, and request the current session state to be transferred to this node.
if ( this.started ) return;
try {
cluster.registerManager(this);
CatalinaCluster catclust = (CatalinaCluster)cluster;
LazyReplicatedMap map = new LazyReplicatedMap(this,
catclust.getChannel(),
DEFAULT_REPL_TIMEOUT,
getMapName(),
getClassLoaders());
map.setChannelSendOptions(mapSendOptions);
this.sessions = map;
super.start();
this.started = true;
} catch ( Exception x ) {
log.error("Unable to start BackupManager",x);
throw new LifecycleException("Failed to start BackupManager",x);
}
|
public void | stop()Gracefully terminate the active use of the public methods of this
component. This method should be the last one called on a given
instance of this component.
This will disconnect the cluster communication channel and stop the listener thread.
LazyReplicatedMap map = (LazyReplicatedMap)sessions;
if ( map!=null ) {
map.breakdown();
}
if ( !this.started ) return;
try {
} catch ( Exception x ){
log.error("Unable to stop BackupManager",x);
throw new LifecycleException("Failed to stop BackupManager",x);
} finally {
super.stop();
}
cluster.removeManager(this);
|
public void | unload()Override persistence since they don't go hand in hand with replication for now.
|