tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r381105 - in /tomcat/container/tc5.5.x/modules/groupcom: src/share/org/apache/catalina/tribes/ src/share/org/apache/catalina/tribes/io/ src/share/org/apache/catalina/tribes/mcast/ src/share/org/apache/catalina/tribes/tcp/ src/share/org/apac...
Date Sun, 26 Feb 2006 15:14:21 GMT
Author: fhanik
Date: Sun Feb 26 07:14:18 2006
New Revision: 381105

URL: http://svn.apache.org/viewcvs?rev=381105&view=rev
Log:
Optimized the Mcast membership`

Modified:
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Constants.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ObjectReader.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ReplicationStream.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/Constants.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMember.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMembership.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastService.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastServiceImpl.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/AsyncSocketSender.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/Constants.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSenders.properties
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/FastAsyncSocketSender.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/IDataSenderFactory.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationListener.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationTransmitter.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/util/FastQueue.java
    tomcat/container/tc5.5.x/modules/groupcom/test/org/apache/catalina/tribes/demos/Draw.java

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Constants.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Constants.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Constants.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Constants.java
Sun Feb 26 07:14:18 2006
@@ -18,7 +18,7 @@
 package org.apache.catalina.tribes;
 
 /**
- * Manifest constants for the <code>org.apache.catalina.groups</code>
+ * Manifest constants for the <code>org.apache.catalina.tribes</code>
  * package.
  *
  * @author Bip Thelin
@@ -26,5 +26,5 @@
  */
 
 public final class Constants {
-    public static final String Package = "org.apache.catalina.groups";
+    public static final String Package = "org.apache.catalina.tribes";
 }

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
Sun Feb 26 07:14:18 2006
@@ -48,7 +48,7 @@
     /**
      * Returns the TCP listen host for the TCP implementation
      */
-    public String getHost();
+    public byte[] getHost();
     /**
      * Returns the TCP listen portfor the TCP implementation
      */

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ObjectReader.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ObjectReader.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ObjectReader.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ObjectReader.java
Sun Feb 26 07:14:18 2006
@@ -90,7 +90,7 @@
      * Send buffer to cluster listener (callback).
      * Is message complete receiver send message to callback?
      *
-     * @see org.apache.catalina.groups.tcp.ClusterReceiverBase#messageDataReceived(ChannelMessage)
+     * @see org.apache.catalina.tribes.tcp.ClusterReceiverBase#messageDataReceived(ChannelMessage)
      * @see XByteBuffer#doesPackageExist()
      * @see XByteBuffer#extractPackage(boolean)
      *

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ReplicationStream.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ReplicationStream.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ReplicationStream.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ReplicationStream.java
Sun Feb 26 07:14:18 2006
@@ -71,7 +71,7 @@
     public Class resolveClass(ObjectStreamClass classDesc)
         throws ClassNotFoundException, IOException {
         String name = classDesc.getName();
-        boolean tryRepFirst = name.startsWith("org.apache.catalina.groups");
+        boolean tryRepFirst = name.startsWith("org.apache.catalina.tribes");
         try {
             try
             {

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/Constants.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/Constants.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/Constants.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/Constants.java
Sun Feb 26 07:14:18 2006
@@ -18,7 +18,7 @@
 package org.apache.catalina.tribes.mcast;
 
 /**
- * Manifest constants for the <code>org.apache.catalina.groups.mcast</code>
+ * Manifest constants for the <code>org.apache.catalina.tribes.mcast</code>
  * package.
  *
  * @author Peter Rossbach
@@ -27,6 +27,6 @@
 
 public class Constants {
 
-    public static final String Package = "org.apache.catalina.groups.mcast";
+    public static final String Package = "org.apache.catalina.tribes.mcast";
 
 }

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMember.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMember.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMember.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMember.java
Sun Feb 26 07:14:18 2006
@@ -22,6 +22,7 @@
 
 import org.apache.catalina.tribes.Member;
 import org.apache.catalina.tribes.io.XByteBuffer;
+import java.util.Arrays;
 
 /**
  * A <b>membership</b> implementation using simple multicast.
@@ -53,7 +54,8 @@
     /**
      * The listen host for this member
      */
-    protected String host;
+    protected byte[] host;
+    protected transient String hostname;
     /**
      * The tcp listen port for this member
      */
@@ -96,8 +98,8 @@
     public McastMember(String domain,
                        String host,
                        int port,
-                       long aliveTime) {
-        this.host = host;
+                       long aliveTime) throws IOException {
+        setHostname(host);
         this.port = port;
         this.domain = domain;
         this.memberAliveTime=aliveTime;
@@ -140,7 +142,7 @@
         //dlen - 4 bytes
         //domain - dlen bytes
         byte[] domaind = getDomain().getBytes();
-        byte[] addr = java.net.InetAddress.getByName(host).getAddress();
+        byte[] addr = host;
         byte[] data = new byte[8+4+addr.length+4+domaind.length];
         long alive=System.currentTimeMillis()-getServiceStartTime();
         System.arraycopy(XByteBuffer.toBytes((long)alive),0,data,0,8);
@@ -176,7 +178,7 @@
        byte[] domaind = new byte[dlen];
        System.arraycopy(data, 20, domaind, 0, domaind.length);
        member.setDomain(new String(domaind));
-       member.setHost(addressToString(addr));
+       member.setHost(addr);
        member.setPort(XByteBuffer.toInt(portd, 0));
        member.setMemberAliveTime(XByteBuffer.toLong(alived, 0));
        return member;
@@ -191,7 +193,7 @@
      * @return a unique name to the cluster
      */
     public String getName() {
-        return "tcp://"+host+":"+port;
+        return "tcp://"+getHostname()+":"+getPort();
     }
     
     /**
@@ -214,8 +216,20 @@
      * Return the TCP listen host for this member
      * @return IP address or host name
      */
-    public String getHost()  {
-        return this.host;
+    public byte[] getHost()  {
+        return host;
+    }
+    
+    public String getHostname() {
+        if ( this.hostname != null ) return hostname;
+        else {
+            try {
+                this.hostname = java.net.InetAddress.getByAddress(host).getHostName();
+                return this.hostname;
+            }catch ( IOException x ) {
+                throw new RuntimeException("Unable to parse hostname.",x);
+            }
+        }
     }
 
     /**
@@ -242,7 +256,7 @@
      * String representation of this object
      */
     public String toString()  {
-        return "org.apache.catalina.groups.mcast.McastMember["+getName()+","+domain+","+host+","+port+",
alive="+memberAliveTime+"]";
+        return "org.apache.catalina.tribes.mcast.McastMember["+getName()+","+domain+","+host+","+port+",
alive="+memberAliveTime+"]";
     }
 
     /**
@@ -250,7 +264,7 @@
      * @return The hash code
      */
     public int hashCode() {
-        return this.getName().hashCode();
+        return getHost()[0]+getHost()[1]+getHost()[2]+getHost()[3];
     }
 
     /**
@@ -259,11 +273,13 @@
      */
     public boolean equals(Object o) {
         if ( o instanceof McastMember )    {
-            return this.getName().equals(((McastMember)o).getName());
+            return Arrays.equals(this.getHost(),((McastMember)o).getHost()) &&
+                   this.getPort() == ((McastMember)o).getPort();
         }
         else
             return false;
     }
+    
 
     /**
      * Converts for bytes (ip address) to a string representation of it<BR>
@@ -325,9 +341,15 @@
         }
         return new String(buf, charPos, 15 - charPos);
     }
-    public void setHost(String host) {
+    public void setHost(byte[] host) {
         this.host = host;
     }
+    
+    public void setHostname(String host) throws IOException {
+        hostname = host;
+        this.host = java.net.InetAddress.getByName(host).getAddress();
+    }
+    
     public void setMsgCount(int msgCount) {
         this.msgCount = msgCount;
     }

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMembership.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMembership.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMembership.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMembership.java
Sun Feb 26 07:14:18 2006
@@ -41,7 +41,7 @@
      * The name of this membership, has to be the same as the name for the local
      * member
      */
-    protected String name;
+    protected McastMember local;
     
     /**
      * A map of all the members in the cluster.
@@ -62,8 +62,8 @@
      * Constructs a new membership
      * @param name - has to be the name of the local member. Used to filter the local member
from the cluster membership
      */
-    public McastMembership(String name) {
-        this.name = name;
+    public McastMembership(McastMember local) {
+        this.local = local;
     }
 
     /**
@@ -85,7 +85,7 @@
     public synchronized boolean memberAlive(McastMember member) {
         boolean result = false;
         //ignore ourselves
-        if ( member.getName().equals(name) ) return result;
+        if (  member.equals(local) ) return result;
 
         //return true if the membership has changed
         MbrEntry entry = (MbrEntry)map.get(member.getName());

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastService.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastService.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastService.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastService.java
Sun Feb 26 07:14:18 2006
@@ -248,7 +248,7 @@
             localMember = new McastMember(domain, host, port, 100);
         } else {
             localMember.setDomain(domain);
-            localMember.setHost(host);
+            localMember.setHostname(host);
             localMember.setPort(port);
             localMember.setMemberAliveTime(100);
         }

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastServiceImpl.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastServiceImpl.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastServiceImpl.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastServiceImpl.java
Sun Feb 26 07:14:18 2006
@@ -135,7 +135,7 @@
         receivePacket = new DatagramPacket(new byte[1000],1000);
         receivePacket.setAddress(address);
         receivePacket.setPort(port);
-        membership = new McastMembership(member.getName());
+        membership = new McastMembership(member);
         timeToExpiration = expireTime;
         this.service = service;
         this.sendFrequency = sendFrequency;

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/AsyncSocketSender.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/AsyncSocketSender.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/AsyncSocketSender.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/AsyncSocketSender.java
Sun Feb 26 07:14:18 2006
@@ -137,7 +137,7 @@
     /*
      * Connect to socket and start background thread to ppush queued messages
      * 
-     * @see org.apache.catalina.groups.tcp.IDataSender#connect()
+     * @see org.apache.catalina.tribes.tcp.IDataSender#connect()
      */
     public void connect() throws java.io.IOException {
         super.connect();
@@ -147,7 +147,7 @@
     /**
      * Disconnect socket ad stop queue thread
      * 
-     * @see org.apache.catalina.groups.tcp.IDataSender#disconnect()
+     * @see org.apache.catalina.tribes.tcp.IDataSender#disconnect()
      */
     public void disconnect() {
         stopThread();
@@ -157,7 +157,7 @@
     /**
      * Send message to queue for later sending
      * 
-     * @see org.apache.catalina.groups.tcp.DataSender#pushMessage(ChannelMessage)
+     * @see org.apache.catalina.tribes.tcp.DataSender#pushMessage(ChannelMessage)
      */
     public void sendMessage(ChannelMessage data)
             throws java.io.IOException {

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/Constants.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/Constants.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/Constants.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/Constants.java
Sun Feb 26 07:14:18 2006
@@ -18,7 +18,7 @@
 package org.apache.catalina.tribes.tcp;
 
 /**
- * Manifest constants for the <code>org.apache.catalina.groups.tcp</code>
+ * Manifest constants for the <code>org.apache.catalina.tribes.tcp</code>
  * package.
  *
  * @author Peter Rossbach
@@ -27,6 +27,6 @@
 
 public class Constants {
 
-    public static final String Package = "org.apache.catalina.groups.tcp";
+    public static final String Package = "org.apache.catalina.tribes.tcp";
 
 }

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java
Sun Feb 26 07:14:18 2006
@@ -561,7 +561,7 @@
 
     /**
      * Connect other cluster member receiver 
-     * @see org.apache.catalina.groups.tcp.IDataSender#connect()
+     * @see org.apache.catalina.tribes.tcp.IDataSender#connect()
      */
     public synchronized void connect() throws java.io.IOException {
         if(!isMessageTransferStarted) {
@@ -626,7 +626,7 @@
     /**
      * Send message
      * 
-     * @see org.apache.catalina.groups.tcp.IDataSender#sendMessage(,
+     * @see org.apache.catalina.tribes.tcp.IDataSender#sendMessage(,
      *      ChannelMessage)
      */
     public synchronized void sendMessage(ChannelMessage data)

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSenders.properties
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSenders.properties?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSenders.properties
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSenders.properties
Sun Feb 26 07:14:18 2006
@@ -1,4 +1,4 @@
-fastasyncqueue=org.apache.catalina.groups.tcp.FastAsyncSocketSender
-asynchronous=org.apache.catalina.groups.tcp.AsyncSocketSender
-synchronous=org.apache.catalina.groups.tcp.SocketSender
-pooled=org.apache.catalina.groups.tcp.PooledSocketSender
+fastasyncqueue=org.apache.catalina.tribes.tcp.FastAsyncSocketSender
+asynchronous=org.apache.catalina.tribes.tcp.AsyncSocketSender
+synchronous=org.apache.catalina.tribes.tcp.SocketSender
+pooled=org.apache.catalina.tribes.tcp.PooledSocketSender

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/FastAsyncSocketSender.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/FastAsyncSocketSender.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/FastAsyncSocketSender.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/FastAsyncSocketSender.java
Sun Feb 26 07:14:18 2006
@@ -277,7 +277,7 @@
     /**
      * Connect to socket and start background thread to push queued messages
      * 
-     * @see org.apache.catalina.groups.tcp.IDataSender#connect()
+     * @see org.apache.catalina.tribes.tcp.IDataSender#connect()
      */
     public void connect() throws java.io.IOException {
         super.connect();
@@ -289,7 +289,7 @@
     /**
      * Disconnect socket ad stop queue thread
      * 
-     * @see org.apache.catalina.groups.tcp.IDataSender#disconnect()
+     * @see org.apache.catalina.tribes.tcp.IDataSender#disconnect()
      */
     public void disconnect() {
         stopThread();
@@ -304,7 +304,7 @@
     /**
      * Send message to queue for later sending.
      * 
-     * @see org.apache.catalina.groups.tcp.DataSender#pushMessage(ChannelMessage)
+     * @see org.apache.catalina.tribes.tcp.DataSender#pushMessage(ChannelMessage)
      */
     public void sendMessage(ChannelMessage data)
             throws java.io.IOException {

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/IDataSenderFactory.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/IDataSenderFactory.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/IDataSenderFactory.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/IDataSenderFactory.java
Sun Feb 26 07:14:18 2006
@@ -28,7 +28,7 @@
 
 /**
  * Create DataSender for different modes. DataSender factory load mode list from 
- * <code>org/apache/catalina/groups/tcp/DataSenders.properties</code> resource.
+ * <code>org/apache/catalina/tribes/tcp/DataSenders.properties</code> resource.
  * 
  * @author Peter Rossbach
  * @version $Revision: 304032 $ $Date: 2005-07-27 10:11:55 -0500 (Wed, 27 Jul 2005) $
@@ -39,7 +39,7 @@
     private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
             .getLog(IDataSenderFactory.class);
     
-    private static final String DATASENDERS_PROPERTIES = "org/apache/catalina/groups/tcp/DataSenders.properties";
+    private static final String DATASENDERS_PROPERTIES = "org/apache/catalina/tribes/tcp/DataSenders.properties";
     public static final String SYNC_MODE = "synchronous";
     public static final String ASYNC_MODE = "asynchronous";
     public static final String POOLED_SYNC_MODE = "pooled";
@@ -142,7 +142,7 @@
                 if (constructor != null) {
                     Object paramValues[] = new Object[3];
                     paramValues[0] = mbr.getDomain();
-                    paramValues[1] = InetAddress.getByName(mbr.getHost());
+                    paramValues[1] = InetAddress.getByAddress(mbr.getHost());
                     paramValues[2] = new Integer(mbr.getPort());
                     sender = (IDataSender) constructor.newInstance(paramValues);
                 } else {

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationListener.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationListener.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationListener.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationListener.java
Sun Feb 26 07:14:18 2006
@@ -115,7 +115,7 @@
     /**
      * start cluster receiver
      * @throws Exception
-     * @see org.apache.catalina.groups.ClusterReceiver#start()
+     * @see org.apache.catalina.tribes.ClusterReceiver#start()
      */
     public void start() {
         try {
@@ -222,7 +222,7 @@
     /**
      * Close Selector.
      *
-     * @see org.apache.catalina.groups.tcp.ClusterReceiverBase#stopListening()
+     * @see org.apache.catalina.tribes.tcp.ClusterReceiverBase#stopListening()
      */
     protected void stopListening() {
         // Bugzilla 37529: http://issues.apache.org/bugzilla/show_bug.cgi?id=37529
@@ -395,7 +395,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.apache.catalina.groups.io.ListenCallback#sendAck()
+     * @see org.apache.catalina.tribes.io.ListenCallback#sendAck()
      */
     public void sendAck() throws IOException {
         // do nothing

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationTransmitter.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationTransmitter.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationTransmitter.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationTransmitter.java
Sun Feb 26 07:14:18 2006
@@ -403,7 +403,7 @@
     
     /**
      * Send data to one member
-     * @see org.apache.catalina.groups.ClusterSender#sendMessage(org.apache.catalina.groups.ClusterMessage,
org.apache.catalina.groups.Member)
+     * @see org.apache.catalina.tribes.ClusterSender#sendMessage(org.apache.catalina.tribes.ClusterMessage,
org.apache.catalina.tribes.Member)
      */
     public void sendMessage(ChannelMessage message, Member member) throws IOException { 
     
         long time = 0 ;
@@ -427,7 +427,7 @@
 
     /**
      * send message to all senders (broadcast)
-     * @see org.apache.catalina.groups.ClusterSender#sendMessage(org.apache.catalina.groups.ClusterMessage)
+     * @see org.apache.catalina.tribes.ClusterSender#sendMessage(org.apache.catalina.tribes.ClusterMessage)
      */
     public void sendMessage(ChannelMessage message, boolean domainOnly) throws IOException
{
         long time = 0;
@@ -455,7 +455,7 @@
     /**
      * start the sender and register transmitter mbean
      * 
-     * @see org.apache.catalina.groups.ClusterSender#start()
+     * @see org.apache.catalina.tribes.ClusterSender#start()
      */
     public void start() throws java.io.IOException {
     }
@@ -463,7 +463,7 @@
     /*
      * stop the sender and deregister mbeans (transmitter, senders)
      * 
-     * @see org.apache.catalina.groups.ClusterSender#stop()
+     * @see org.apache.catalina.tribes.ClusterSender#stop()
      */
     public synchronized void stop() {
         Iterator i = map.entrySet().iterator();
@@ -541,7 +541,7 @@
      * add new cluster member and create sender ( s. replicationMode) transfer
      * current properties to sender
      * 
-     * @see org.apache.catalina.groups.ClusterSender#add(org.apache.catalina.groups.Member)
+     * @see org.apache.catalina.tribes.ClusterSender#add(org.apache.catalina.tribes.Member)
      */
     public synchronized void add(Member member) {
         try {
@@ -560,7 +560,7 @@
     /**
      * remove sender from transmitter. ( deregister mbean and disconnect sender )
      * 
-     * @see org.apache.catalina.groups.ClusterSender#remove(org.apache.catalina.groups.Member)
+     * @see org.apache.catalina.tribes.ClusterSender#remove(org.apache.catalina.tribes.Member)
      */
     public synchronized void remove(Member member) {
         String key = getKey(member);

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/util/FastQueue.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/util/FastQueue.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/util/FastQueue.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/util/FastQueue.java
Sun Feb 26 07:14:18 2006
@@ -194,7 +194,7 @@
     /**
      * get Max Queue length
      * 
-     * @see org.apache.catalina.groups.util.IQueue#getMaxQueueLength()
+     * @see org.apache.catalina.tribes.util.IQueue#getMaxQueueLength()
      */
     public int getMaxQueueLength() {
         return maxQueueLength;
@@ -413,7 +413,7 @@
 
     /**
      * Add new data to the queue
-     * @see org.apache.catalina.groups.util.IQueue#add(java.lang.String, java.lang.Object)
+     * @see org.apache.catalina.tribes.util.IQueue#add(java.lang.String, java.lang.Object)
      * FIXME extract some method
      */
     public boolean add(String key, Object data) {
@@ -529,7 +529,7 @@
 
     /**
      * remove the complete queued object list
-     * @see org.apache.catalina.groups.util.IQueue#remove()
+     * @see org.apache.catalina.tribes.util.IQueue#remove()
      * FIXME extract some method
      */
     public LinkObject remove() {

Modified: tomcat/container/tc5.5.x/modules/groupcom/test/org/apache/catalina/tribes/demos/Draw.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/test/org/apache/catalina/tribes/demos/Draw.java?rev=381105&r1=381104&r2=381105&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/test/org/apache/catalina/tribes/demos/Draw.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/test/org/apache/catalina/tribes/demos/Draw.java
Sun Feb 26 07:14:18 2006
@@ -65,7 +65,7 @@
         this.jmx = jmx;
         if (no_channel)
             return;
-
+        mainFrame = new JFrame();
         ReplicationListener rl = new ReplicationListener();
         rl.setTcpListenAddress(bind);
         rl.setTcpListenPort(port);
@@ -187,7 +187,7 @@
     }
 
     public void go() throws Exception {
-        mainFrame = new JFrame();
+        
         mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         panel = new DrawPanel(this);
         panel.setBackground(background_color);



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


Mime
View raw message