tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1498826 - /tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java
Date Tue, 02 Jul 2013 08:23:26 GMT
Author: kfujino
Date: Tue Jul  2 08:23:26 2013
New Revision: 1498826

URL: http://svn.apache.org/r1498826
Log:
Add new attribute terminateOnStartFailure.

Modified:
    tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java?rev=1498826&r1=1498825&r2=1498826&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java Tue Jul  2 08:23:26
2013
@@ -70,6 +70,11 @@ public class BackupManager extends Clust
     private long rpcTimeout = DEFAULT_REPL_TIMEOUT;
 
     /**
+     * Flag for whether to terminate this map that failed to start.
+     */
+    private boolean terminateOnStartFailure = false;
+
+    /**
      * Constructor, just calls super()
      *
      */
@@ -163,7 +168,7 @@ public class BackupManager extends Clust
             cluster.registerManager(this);
             LazyReplicatedMap<String,Session> map = new LazyReplicatedMap<>(
                     this, cluster.getChannel(), rpcTimeout, getMapName(),
-                    getClassLoaders());
+                    getClassLoaders(), terminateOnStartFailure);
             map.setChannelSendOptions(mapSendOptions);
             this.sessions = map;
         }  catch ( Exception x ) {
@@ -234,6 +239,14 @@ public class BackupManager extends Clust
         return rpcTimeout;
     }
 
+    public void setTerminateOnStartFailure(boolean terminateOnStartFailure) {
+        this.terminateOnStartFailure = terminateOnStartFailure;
+    }
+
+    public boolean isTerminateOnStartFailure() {
+        return terminateOnStartFailure;
+    }
+
     @Override
     public String[] getInvalidatedSessions() {
         return new String[0];
@@ -246,6 +259,7 @@ public class BackupManager extends Clust
         result.mExpireSessionsOnShutdown = mExpireSessionsOnShutdown;
         result.mapSendOptions = mapSendOptions;
         result.rpcTimeout = rpcTimeout;
+        result.terminateOnStartFailure = terminateOnStartFailure;
         return result;
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message