You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fh...@apache.org on 2006/10/11 19:16:31 UTC

svn commit: r462864 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes: membership/McastService.java transport/ReceiverBase.java

Author: fhanik
Date: Wed Oct 11 10:16:31 2006
New Revision: 462864

URL: http://svn.apache.org/viewvc?view=rev&rev=462864
Log:
Cleaned up setters to more consistent names with the rest of the code base


Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java?view=diff&rev=462864&r1=462863&r2=462864
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java Wed Oct 11 10:16:31 2006
@@ -162,45 +162,114 @@
         }
     }
     
-    public void setMcastAddr(String addr) {
+    public void setAddress(String addr) {
         properties.setProperty("mcastAddress", addr);
     }
-
-    public String getMcastAddr() {
+    
+    /**
+     * @deprecated use setAddress
+     * @param addr String
+     */
+    public void setMcastAddr(String addr) {
+        setAddress(addr);
+    }
+    
+    public String getAddress() {
         return properties.getProperty("mcastAddress");
     }
+    
+    /**
+     * @deprecated use getAddress
+     * @return String
+     */
+    public String getMcastAddr() {
+        return getAddress();
+    }
 
     public void setMcastBindAddress(String bindaddr) {
+        setBind(bindaddr);
+    }
+    
+    public void setBind(String bindaddr) {
         properties.setProperty("mcastBindAddress", bindaddr);
     }
-
+    /**
+     * @deprecated use getBind
+     * @return String
+     */
     public String getMcastBindAddress() {
+        return getBind();
+    }
+
+    public String getBind() {
         return properties.getProperty("mcastBindAddress");
     }
 
+    /**
+     * @deprecated use setPort
+     * @param port int
+     */
     public void setMcastPort(int port) {
+        setPort(port);
+    }
+
+    public void setPort(int port) {
         properties.setProperty("mcastPort", String.valueOf(port));
     }
 
+    /**
+     * @deprecated use getPort()
+     * @return int
+     */
     public int getMcastPort() {
+        return getPort();
+    }
+    public int getPort() {
         String p = properties.getProperty("mcastPort");
         return new Integer(p).intValue();
     }
     
+    /**
+     * @deprecated use setFrequency
+     * @param time long
+     */
     public void setMcastFrequency(long time) {
+        setFrequency(time);
+    }
+    
+    public void setFrequency(long time) {
         properties.setProperty("mcastFrequency", String.valueOf(time));
     }
 
+    /**
+     * @deprecated use getFrequency
+     * @return long
+     */
     public long getMcastFrequency() {
+        return getFrequency();
+    }
+
+    public long getFrequency() {
         String p = properties.getProperty("mcastFrequency");
         return new Long(p).longValue();
     }
 
     public void setMcastDropTime(long time) {
+        setDropTime(time);
+    }
+    public void setDropTime(long time) {
         properties.setProperty("memberDropTime", String.valueOf(time));
     }
-
+    
+    /**
+     * @deprecated use getDropTime
+     * @return long
+     */
     public long getMcastDropTime() {
+        return getDropTime();
+    }
+
+    public long getDropTime() {
         String p = properties.getProperty("memberDropTime");
         return new Long(p).longValue();
     }
@@ -373,14 +442,40 @@
         if ( listener!=null ) listener.memberDisappeared(member);
     }
 
+    /**
+     * @deprecated use getSoTimeout
+     * @return int
+     */
     public int getMcastSoTimeout() {
+        return getSoTimeout();
+    }
+    
+    public int getSoTimeout() {
         return mcastSoTimeout;
     }
+    
+    /**
+     * @deprecated use setSoTimeout
+     * @param mcastSoTimeout int
+     */
     public void setMcastSoTimeout(int mcastSoTimeout) {
+        setSoTimeout(mcastSoTimeout);
+    }
+    
+    public void setSoTimeout(int mcastSoTimeout) {
         this.mcastSoTimeout = mcastSoTimeout;
         properties.setProperty("mcastSoTimeout", String.valueOf(mcastSoTimeout));
     }
+    
+    /**
+     * @deprecated use getTtl
+     * @return int
+     */
     public int getMcastTTL() {
+        return getTtl();
+    }
+    
+    public int getTtl() {
         return mcastTTL;
     }
 
@@ -391,8 +486,16 @@
     public byte[] getDomain() {
         return domain;
     }
-
+    
+    /**
+     * @deprecated use setTtl
+     * @param mcastTTL int
+     */
     public void setMcastTTL(int mcastTTL) {
+        setTtl(mcastTTL);
+    }
+
+    public void setTtl(int mcastTTL) {
         this.mcastTTL = mcastTTL;
         properties.setProperty("mcastTTL", String.valueOf(mcastTTL));
     }

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java?view=diff&rev=462864&r1=462863&r2=462864
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java Wed Oct 11 10:16:31 2006
@@ -106,7 +106,7 @@
      * @return int
      */
     public int getTcpThreadCount() {
-        return getMinThreads();
+        return getMaxThreads();
     }
 
     /**
@@ -119,12 +119,20 @@
         this.listener = listener;
     }
 
+    /**
+     * @deprecated use setPort
+     * @param tcpListenPort int
+     */
     public void setTcpListenPort(int tcpListenPort) {
-        this.port = tcpListenPort;
+        setPort(tcpListenPort);
     }
 
+    /**
+     * @deprecated use setAddress
+     * @param tcpListenHost String
+     */
     public void setTcpListenAddress(String tcpListenHost) {
-        this.host = tcpListenHost;
+        setAddress(tcpListenHost);
     }
 
     public void setRxBufSize(int rxBufSize) {
@@ -135,7 +143,12 @@
         this.txBufSize = txBufSize;
     }
 
+    /**
+     * @deprecated use setMaxThreads/setMinThreads
+     * @param tcpThreadCount int
+     */
     public void setTcpThreadCount(int tcpThreadCount) {
+        setMaxThreads(tcpThreadCount);
         setMinThreads(tcpThreadCount);
     }
 
@@ -172,7 +185,7 @@
             try {
                 addr = new InetSocketAddress(getBind(), portstart);
                 socket.bind(addr);
-                setTcpListenPort(portstart);
+                setPort(portstart);
                 log.info("Receiver Server Socket bound to:"+addr);
                 return 0;
             }catch ( IOException x) {
@@ -209,11 +222,15 @@
         this.bind = bind;
     }
 
-
+    /**
+     * @deprecated use getPort
+     * @return int
+     */
     public int getTcpListenPort() {
-        return this.port;
+        return getPort();
     }
 
+    
     public boolean getDirect() {
         return direct;
     }
@@ -225,15 +242,25 @@
     }
 
 
-
-    public String getHost() {
+    public String getAddress() {
         getBind();
         return this.host;
     }
+    
+    public String getHost() {
+        return getAddress();
+    }
 
-    public long getTcpSelectorTimeout() {
+    public long getSelectorTimeout() {
         return tcpSelectorTimeout;
     }
+    /**
+     * @deprecated use getSelectorTimeout
+     * @return long
+     */
+    public long getTcpSelectorTimeout() {
+        return getSelectorTimeout();
+    }
 
     public boolean doListen() {
         return listen;
@@ -246,9 +273,13 @@
     public ThreadPool getPool() {
         return pool;
     }
-
+    
+    /**
+     * @deprecated use getAddress
+     * @return String
+     */
     public String getTcpListenAddress() {
-        return getHost();
+        return getAddress();
     }
 
     public int getAutoBind() {
@@ -304,7 +335,15 @@
         return securePort;
     }
 
+    /**
+     * @deprecated use setSelectorTimeout
+     * @param selTimeout long
+     */
     public void setTcpSelectorTimeout(long selTimeout) {
+        setSelectorTimeout(selTimeout);
+    }
+    
+    public void setSelectorTimeout(long selTimeout) {
         tcpSelectorTimeout = selTimeout;
     }
 
@@ -312,8 +351,12 @@
         this.listen = doListen;
     }
 
-    public void setHost(String host) {
+    
+    public void setAddress(String host) {
         this.host = host;
+    }
+    public void setHost(String host) {
+        setAddress(host);
     }
 
     public void setListener(MessageListener listener) {



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