tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r385875 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes: group/ group/interceptors/ io/ mcast/ tcp/ tcp/bio/ tcp/nio/ tipis/
Date Tue, 14 Mar 2006 20:23:25 GMT
Author: fhanik
Date: Tue Mar 14 12:23:15 2006
New Revision: 385875

URL: http://svn.apache.org/viewcvs?rev=385875&view=rev
Log:
Refactored threading and thread pooling 

Added:
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ThreadPool.java
      - copied, changed from r385872, tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ThreadPool.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/WorkerThread.java
      - copied, changed from r385649, tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/WorkerThread.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioReplicationThread.java
      - copied, changed from r385872, tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/TcpReplicationThread.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReplicationThread.java
      - copied, changed from r385849, tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/TcpReplicationThread.java
Removed:
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/TcpReplicationThread.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/TcpReplicationThread.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ThreadPool.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/WorkerThread.java
Modified:
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelInterceptorBase.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/DirectByteArrayOutputStream.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ListenCallback.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/mcast/Constants.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/ReceiverBase.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioReceiver.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReceiver.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/ReplicatedMapEntry.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/Response.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/RpcCallback.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/RpcChannel.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/Streamable.java

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java
Tue Mar 14 12:23:15 2006
@@ -24,6 +24,7 @@
 import org.apache.catalina.tribes.Channel;
 import org.apache.catalina.tribes.InterceptorPayload;
 import org.apache.catalina.tribes.MessageListener;
+import org.apache.catalina.tribes.tcp.*;
 
 
 /**

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelInterceptorBase.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelInterceptorBase.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelInterceptorBase.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelInterceptorBase.java
Tue Mar 14 12:23:15 2006
@@ -24,6 +24,7 @@
 import org.apache.catalina.tribes.InterceptorPayload;
 import org.apache.catalina.tribes.io.ClusterData;
 import org.apache.catalina.tribes.ChannelException;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  * Abstract class for the interceptor base class.

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java
Tue Mar 14 12:23:15 2006
@@ -33,6 +33,7 @@
 import org.apache.catalina.tribes.io.ClusterData;
 import org.apache.catalina.tribes.io.XByteBuffer;
 import java.util.ArrayList;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  * The GroupChannel manages the replication channel. It coordinates

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
Tue Mar 14 12:23:15 2006
@@ -27,6 +27,7 @@
 import java.util.Collection;
 import java.util.ArrayList;
 import java.util.Set;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  *

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java
Tue Mar 14 12:23:15 2006
@@ -27,6 +27,7 @@
 import java.util.zip.GZIPOutputStream;
 import java.util.Arrays;
 import org.apache.catalina.tribes.ChannelException;
+import org.apache.catalina.tribes.tcp.*;
 
 
 

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java
Tue Mar 14 12:23:15 2006
@@ -23,6 +23,7 @@
 import org.apache.catalina.tribes.Member;
 import org.apache.catalina.tribes.group.ChannelInterceptorBase;
 import org.apache.catalina.tribes.io.XByteBuffer;
+import org.apache.catalina.tribes.tcp.*;
 
 
 

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/DirectByteArrayOutputStream.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/DirectByteArrayOutputStream.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/DirectByteArrayOutputStream.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/DirectByteArrayOutputStream.java
Tue Mar 14 12:23:15 2006
@@ -18,6 +18,7 @@
 
 import java.io.IOException;
 import java.io.OutputStream;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  * Byte array output stream that exposes the byte array directly

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ListenCallback.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ListenCallback.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ListenCallback.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ListenCallback.java
Tue Mar 14 12:23:15 2006
@@ -17,6 +17,7 @@
 package org.apache.catalina.tribes.io;
 
 import org.apache.catalina.tribes.ChannelMessage;
+import org.apache.catalina.tribes.tcp.*;
 
 
 

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=385875&r1=385874&r2=385875&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
Tue Mar 14 12:23:15 2006
@@ -21,6 +21,7 @@
 import org.apache.catalina.tribes.ChannelMessage;
 import java.io.IOException;
 import java.net.Socket;
+import org.apache.catalina.tribes.tcp.*;
 
 
 

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=385875&r1=385874&r2=385875&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
Tue Mar 14 12:23:15 2006
@@ -17,6 +17,8 @@
 
 package org.apache.catalina.tribes.mcast;
 
+import org.apache.catalina.tribes.tcp.*;
+
 /**
  * Manifest constants for the <code>org.apache.catalina.tribes.mcast</code>
  * package.

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=385875&r1=385874&r2=385875&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
Tue Mar 14 12:23:15 2006
@@ -23,6 +23,7 @@
 import java.util.Arrays;
 import java.util.Iterator;
 import org.apache.catalina.tribes.Member;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  * A <b>membership</b> implementation using simple multicast.

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=385875&r1=385874&r2=385875&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
Tue Mar 14 12:23:15 2006
@@ -29,6 +29,7 @@
 import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.util.StringManager;
 import org.apache.commons.modeler.Registry;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  * A <b>membership</b> implementation using simple multicast.

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=385875&r1=385874&r2=385875&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
Tue Mar 14 12:23:15 2006
@@ -22,6 +22,7 @@
 import java.net.InetAddress ;
 import java.net.DatagramPacket;
 import org.apache.catalina.tribes.MembershipListener;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  * A <b>membership</b> implementation using simple multicast.

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReceiverBase.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReceiverBase.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReceiverBase.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReceiverBase.java
Tue Mar 14 12:23:15 2006
@@ -24,7 +24,7 @@
 import org.apache.catalina.tribes.ChannelReceiver;
 import org.apache.catalina.tribes.MessageListener;
 import org.apache.catalina.tribes.io.ListenCallback;
-import org.apache.catalina.tribes.tcp.nio.ThreadPool;
+
 
 /**
  * <p>Title: </p>

Copied: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ThreadPool.java
(from r385872, tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ThreadPool.java)
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ThreadPool.java?p2=tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ThreadPool.java&p1=tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ThreadPool.java&r1=385872&r2=385875&rev=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ThreadPool.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ThreadPool.java
Tue Mar 14 12:23:15 2006
@@ -14,10 +14,11 @@
  * limitations under the License.
  */
 
-package org.apache.catalina.tribes.tcp.nio;
+package org.apache.catalina.tribes.tcp;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Iterator;
+import org.apache.catalina.tribes.tcp.nio.*;
 
 /**
  * @author not attributable

Copied: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/WorkerThread.java
(from r385649, tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/WorkerThread.java)
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/WorkerThread.java?p2=tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/WorkerThread.java&p1=tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/WorkerThread.java&r1=385649&r2=385875&rev=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/WorkerThread.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/WorkerThread.java
Tue Mar 14 12:23:15 2006
@@ -14,7 +14,10 @@
  * limitations under the License.
  */
 
-package org.apache.catalina.tribes.tcp.nio;
+package org.apache.catalina.tribes.tcp;
+
+
+
 
 /**
  * @author Filip Hanik
@@ -22,6 +25,12 @@
  */
 public class WorkerThread extends Thread
 {
+    
+    public static final int OPTION_SEND_ACK = ReceiverBase.OPTION_SEND_ACK;
+    public static final int OPTION_SYNCHRONIZED = ReceiverBase.OPTION_SYNCHRONIZED;
+    public static final int OPTION_DIRECT_BUFFER = ReceiverBase.OPTION_DIRECT_BUFFER;
+    
+    
     protected ThreadPool pool;
     protected boolean doRun = true;
     private int options;
@@ -46,6 +55,17 @@
     {
         doRun = false;
         notify();
-
     }
+    
+    public boolean sendAckSync() {
+        int options = getOptions();
+        return ((OPTION_SEND_ACK & options) == OPTION_SEND_ACK) &&
+               ((OPTION_SYNCHRONIZED & options) == OPTION_SYNCHRONIZED);
+    }
+
+    public boolean sendAckAsync() {
+        int options = getOptions();
+        return ((OPTION_SEND_ACK & options) == OPTION_SEND_ACK) &&
+               ((OPTION_SYNCHRONIZED & options) != OPTION_SYNCHRONIZED);
+    }    
 }

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioReceiver.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioReceiver.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioReceiver.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioReceiver.java
Tue Mar 14 12:23:15 2006
@@ -23,7 +23,8 @@
 import org.apache.catalina.tribes.io.ListenCallback;
 import org.apache.catalina.tribes.io.ObjectReader;
 import org.apache.catalina.tribes.tcp.ReceiverBase;
-import org.apache.catalina.tribes.tcp.nio.ThreadPool;
+import org.apache.catalina.tribes.tcp.ThreadPool;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  * <p>Title: </p>
@@ -53,7 +54,7 @@
      */
     public void start() throws IOException {
         try {
-            TcpReplicationThread[] receivers = new TcpReplicationThread[tcpThreadCount];
+            BioReplicationThread[] receivers = new BioReplicationThread[tcpThreadCount];
             for ( int i=0; i<receivers.length; i++ ) {
                 receivers[i] = getReplicationThread();
             }
@@ -73,8 +74,8 @@
         }
     }
     
-    protected TcpReplicationThread getReplicationThread() {
-        TcpReplicationThread result = new TcpReplicationThread();
+    protected BioReplicationThread getReplicationThread() {
+        BioReplicationThread result = new BioReplicationThread();
         result.setOptions(getWorkerThreadOptions());
         return result;
     }
@@ -124,7 +125,7 @@
                 if ( log.isWarnEnabled() )
                     log.warn("All BIO server replication threads are busy, unable to handle
more requests until a thread is freed up.");
             }
-            TcpReplicationThread thread = (TcpReplicationThread)pool.getWorker();
+            BioReplicationThread thread = (BioReplicationThread)pool.getWorker();
             if ( thread == null ) continue; //should never happen
             try {
                 socket = serverSocket.accept();

Copied: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioReplicationThread.java
(from r385872, tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/TcpReplicationThread.java)
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioReplicationThread.java?p2=tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioReplicationThread.java&p1=tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/TcpReplicationThread.java&r1=385872&r2=385875&rev=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/TcpReplicationThread.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioReplicationThread.java
Tue Mar 14 12:23:15 2006
@@ -19,7 +19,7 @@
 
 import org.apache.catalina.tribes.io.ObjectReader;
 import org.apache.catalina.tribes.tcp.Constants;
-import org.apache.catalina.tribes.tcp.nio.WorkerThread;
+import org.apache.catalina.tribes.tcp.WorkerThread;
 import java.net.Socket;
 import java.io.InputStream;
 import org.apache.catalina.tribes.tcp.ReceiverBase;
@@ -39,18 +39,15 @@
  * 
  * @version $Revision: 378050 $, $Date: 2006-02-15 12:30:02 -0600 (Wed, 15 Feb 2006) $
  */
-public class TcpReplicationThread extends WorkerThread {
-    public static final int OPTION_SEND_ACK = ReceiverBase.OPTION_SEND_ACK;
-    public static final int OPTION_SYNCHRONIZED = ReceiverBase.OPTION_SYNCHRONIZED;
-    public static final int OPTION_DIRECT_BUFFER = ReceiverBase.OPTION_DIRECT_BUFFER;
+public class BioReplicationThread extends WorkerThread {
 
 
-    protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(
TcpReplicationThread.class );
+    protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(
BioReplicationThread.class );
     
     protected Socket socket;
     protected ObjectReader reader;
     
-    public TcpReplicationThread ()
+    public BioReplicationThread ()
     {
     }
 
@@ -143,17 +140,6 @@
     }
 
 
-    public boolean sendAckSync() {
-        int options = getOptions();
-        return ((OPTION_SEND_ACK & options) == OPTION_SEND_ACK) &&
-               ((OPTION_SYNCHRONIZED & options) == OPTION_SYNCHRONIZED);
-    }
-
-    public boolean sendAckAsync() {
-        int options = getOptions();
-        return ((OPTION_SEND_ACK & options) == OPTION_SEND_ACK) &&
-               ((OPTION_SYNCHRONIZED & options) != OPTION_SYNCHRONIZED);
-    }
 
 
     /**

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReceiver.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReceiver.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReceiver.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReceiver.java
Tue Mar 14 12:23:15 2006
@@ -34,6 +34,7 @@
 import org.apache.catalina.tribes.tcp.Constants;
 import org.apache.catalina.util.StringManager;
 import org.apache.catalina.tribes.tcp.ReceiverBase;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  * @author Filip Hanik
@@ -86,9 +87,9 @@
      */
     public void start() {
         try {
-            TcpReplicationThread[] receivers = new TcpReplicationThread[tcpThreadCount];
+            NioReplicationThread[] receivers = new NioReplicationThread[tcpThreadCount];
             for ( int i=0; i<receivers.length; i++ ) {
-                receivers[i] = new TcpReplicationThread();
+                receivers[i] = new NioReplicationThread();
                 receivers[i].setRxBufSize(getRxBufSize());
                 receivers[i].setOptions(getWorkerThreadOptions());
             }
@@ -264,7 +265,7 @@
      *  will then de-register the channel on the next select call.
      */
     protected void readDataFromSocket(SelectionKey key) throws Exception {
-        TcpReplicationThread worker = (TcpReplicationThread) pool.getWorker();
+        NioReplicationThread worker = (NioReplicationThread) pool.getWorker();
         if (worker == null) {
             // No threads available, do nothing, the selection
             // loop will keep calling this method until a

Copied: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReplicationThread.java
(from r385849, tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/TcpReplicationThread.java)
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReplicationThread.java?p2=tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReplicationThread.java&p1=tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/TcpReplicationThread.java&r1=385849&r2=385875&rev=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/TcpReplicationThread.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReplicationThread.java
Tue Mar 14 12:23:15 2006
@@ -23,6 +23,7 @@
 import org.apache.catalina.tribes.io.ObjectReader;
 import org.apache.catalina.tribes.tcp.Constants;
 import org.apache.catalina.tribes.tcp.ReceiverBase;
+import org.apache.catalina.tribes.tcp.WorkerThread;
 
 /**
  * A worker thread class which can drain channels and echo-back the input. Each
@@ -38,18 +39,13 @@
  * 
  * @version $Revision: 378050 $, $Date: 2006-02-15 12:30:02 -0600 (Wed, 15 Feb 2006) $
  */
-public class TcpReplicationThread extends WorkerThread {
-    public static final int OPTION_SEND_ACK = ReceiverBase.OPTION_SEND_ACK;
-    public static final int OPTION_SYNCHRONIZED = ReceiverBase.OPTION_SYNCHRONIZED;
-    public static final int OPTION_DIRECT_BUFFER = ReceiverBase.OPTION_DIRECT_BUFFER;
-
-
+public class NioReplicationThread extends WorkerThread {
     
-    private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(
TcpReplicationThread.class );
+    private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(
NioReplicationThread.class );
     private ByteBuffer buffer = null;
     private SelectionKey key;
     private int rxBufSize;
-    public TcpReplicationThread ()
+    public NioReplicationThread ()
     {
     }
 
@@ -200,17 +196,7 @@
     }
     
     
-    public boolean sendAckSync() {
-        int options = getOptions();
-        return ((OPTION_SEND_ACK & options) == OPTION_SEND_ACK) &&
-               ((OPTION_SYNCHRONIZED & options) == OPTION_SYNCHRONIZED);
-    }
-    
-    public boolean sendAckAsync() {
-        int options = getOptions();
-        return ((OPTION_SEND_ACK & options) == OPTION_SEND_ACK) &&
-               ((OPTION_SYNCHRONIZED & options) != OPTION_SYNCHRONIZED);
-    }
+
 
 
     /**

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java
Tue Mar 14 12:23:15 2006
@@ -40,6 +40,7 @@
 import org.apache.catalina.tribes.io.DirectByteArrayOutputStream;
 import org.apache.catalina.tribes.io.XByteBuffer;
 import org.apache.catalina.tribes.mcast.McastMember;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  * A smart implementation of a stateful replicated map. uses primary/secondary backup strategy.


Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/ReplicatedMapEntry.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/ReplicatedMapEntry.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/ReplicatedMapEntry.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/ReplicatedMapEntry.java
Tue Mar 14 12:23:15 2006
@@ -17,6 +17,7 @@
 
 import java.io.Serializable;
 import java.io.IOException;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  * 

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/Response.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/Response.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/Response.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/Response.java
Tue Mar 14 12:23:15 2006
@@ -18,6 +18,7 @@
 import java.io.Serializable;
 
 import org.apache.catalina.tribes.Member;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  * A response object holds a message from a responding partner.

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/RpcCallback.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/RpcCallback.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/RpcCallback.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/RpcCallback.java
Tue Mar 14 12:23:15 2006
@@ -17,6 +17,7 @@
 
 import java.io.Serializable;
 import org.apache.catalina.tribes.Member;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  * The RpcCallback interface is an interface for the Tribes channel to request a

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/RpcChannel.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/RpcChannel.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/RpcChannel.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/RpcChannel.java
Tue Mar 14 12:23:15 2006
@@ -29,6 +29,7 @@
 import org.apache.catalina.tribes.ChannelListener;
 import org.apache.catalina.tribes.Member;
 import org.apache.catalina.tribes.util.UUIDGenerator;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  * A channel to handle RPC messaging

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/Streamable.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/Streamable.java?rev=385875&r1=385874&r2=385875&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/Streamable.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/Streamable.java
Tue Mar 14 12:23:15 2006
@@ -16,6 +16,7 @@
 package org.apache.catalina.tribes.tipis;
 
 import java.io.IOException;
+import org.apache.catalina.tribes.tcp.*;
 
 /**
  * Example usage:



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


Mime
View raw message