- Add sessionAttributeFilter to clone method
- Reduce visibility of notifyListenersOnReplication
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@
1173090 13f79535-47bb-0310-9956-
ffa450edef68
@Override
public ClusterManager cloneFromTemplate() {
BackupManager result = new BackupManager();
+ clone(result);
result.mExpireSessionsOnShutdown = mExpireSessionsOnShutdown;
- result.name = "Clone-from-"+name;
- result.cluster = cluster;
- result.notifyListenersOnReplication = notifyListenersOnReplication;
result.mapSendOptions = mapSendOptions;
result.maxActiveSessions = maxActiveSessions;
result.rpcTimeout = rpcTimeout;
/**
* Should listeners be notified?
*/
- protected boolean notifyListenersOnReplication = true;
+ private boolean notifyListenersOnReplication = true;
/**
* The pattern used for including session attributes to
public void unload() {
// NOOP
}
+
+ protected void clone(ClusterManagerBase copy) {
+ copy.name = "Clone-from-" + getName();
+ copy.cluster = getCluster();
+ copy.maxActiveSessions = getMaxActiveSessions();
+ copy.notifyListenersOnReplication = isNotifyListenersOnReplication();
+ copy.sessionAttributeFilter = getSessionAttributeFilter();
+ }
+
}
try {
session.lock();
DeltaRequest dreq = deserializeDeltaRequest(session, delta);
- dreq.execute(session, notifyListenersOnReplication);
+ dreq.execute(session, isNotifyListenersOnReplication());
session.setPrimarySession(false);
}finally {
session.unlock();
@Override
public ClusterManager cloneFromTemplate() {
DeltaManager result = new DeltaManager();
- result.name = "Clone-from-"+name;
- result.cluster = cluster;
+ clone(result);
result.replicationValve = replicationValve;
- result.maxActiveSessions = maxActiveSessions;
result.expireSessionsOnShutdown = expireSessionsOnShutdown;
- result.notifyListenersOnReplication = notifyListenersOnReplication;
result.notifySessionListenersOnReplication = notifySessionListenersOnReplication;
result.notifyContainerListenersOnReplication = notifyContainerListenersOnReplication;
result.stateTransferTimeout = stateTransferTimeout;