tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp SimpleTcpCluster.java
Date Sat, 22 Feb 2003 00:08:47 GMT
fhanik      2003/02/21 16:08:47

  Modified:    modules/cluster/src/share/org/apache/catalina/cluster/tcp
                        SimpleTcpCluster.java
  Log:
  escalate manager properties from the cluster down to the manager
  
  Revision  Changes    Path
  1.3       +42 -24    jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java
  
  Index: SimpleTcpCluster.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SimpleTcpCluster.java	20 Feb 2003 17:54:15 -0000	1.2
  +++ SimpleTcpCluster.java	22 Feb 2003 00:08:47 -0000	1.3
  @@ -176,6 +176,19 @@
        */
       protected String threadName = "SimpleTcpCluster";
   
  +    /**
  +     * Whether to expire sessions when shutting down
  +     */
  +    protected boolean expireSessionsOnShutdown = true;
  +    /**
  +     * Print debug to std.out?
  +     */
  +    protected boolean printToScreen = false;
  +    /**
  +     * Replicate only sessions that have been marked dirty
  +     * false=replicate sessions after each request
  +     */
  +    protected boolean useDirtyFlag = false;
   
       /**
        * Name for logging purpose
  @@ -375,6 +388,9 @@
       public synchronized Manager createManager(String name) {
           SimpleTcpReplicationManager manager = new SimpleTcpReplicationManager(name);
           manager.setCluster(this);
  +        manager.setExpireSessionsOnShutdown(expireSessionsOnShutdown);
  +        manager.setPrintToScreen(printToScreen);
  +        manager.setUseDirtyFlag(useDirtyFlag);
           managers.put(name, manager);
           return manager;
       }
  @@ -545,50 +561,52 @@
   
       }
   
  -    public void setServiceclass(String clazz)
  -    {
  +    public void setServiceclass(String clazz){
           this.serviceclass = clazz;
       }
  -    public void setMcastAddr(String addr)
  -    {
  +    public void setMcastAddr(String addr) {
           svcproperties.setProperty("mcastAddress",addr);
       }
   
  -    public void setMcastPort(int port)
  -    {
  +    public void setMcastPort(int port) {
           svcproperties.setProperty("mcastPort",String.valueOf(port));
       }
   
  -    public void setMcastFrequency(long time)
  -    {
  +    public void setMcastFrequency(long time) {
           svcproperties.setProperty("msgFrequency",String.valueOf(time));
           msgFrequency = time;
       }
   
  -    public void setMcastDropTime(long time)
  -    {
  +    public void setMcastDropTime(long time) {
           svcproperties.setProperty("memberDropTime",String.valueOf(time));
       }
   
  -    public void setTcpThreadCount(int count)
  -    {
  +    public void setTcpThreadCount(int count) {
           this.tcpThreadCount = count;
       }
   
  -    public void setTcpListenAddress(String address)
  -    {
  -        try
  -        {
  +    public void setTcpListenAddress(String address)  {
  +        try {
               tcpAddress = java.net.InetAddress.getByName(address);
               svcproperties.setProperty("tcpListenHost",address);
  -        }catch ( Exception x )
  -        {
  +        }catch ( Exception x ){
               log.error("Unable to set listen address",x);
           }
       }
   
  -    public void setTcpListenPort(int port)
  -    {
  +    public void setExpireSessionsOnShutdown(boolean expireSessionsOnShutdown){
  +        this.expireSessionsOnShutdown = expireSessionsOnShutdown;
  +    }
  +
  +    public void setPrintToScreen(boolean printToScreen) {
  +        this.printToScreen = printToScreen;
  +    }
  +    public void setUseDirtyFlag(boolean useDirtyFlag) {
  +        this.useDirtyFlag = useDirtyFlag;
  +    }
  +
  +
  +    public void setTcpListenPort(int port) {
           this.tcpPort = port;
           svcproperties.setProperty("tcpListenPort",String.valueOf(port));
       }
  
  
  

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


Mime
View raw message