Make sure to respect the option flag, otherwise you must order everything
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 14 May 2007 12:25:21 +0000 (12:25 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 14 May 2007 12:25:21 +0000 (12:25 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@537797 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java

index 5f6626f..e651b96 100644 (file)
@@ -60,6 +60,10 @@ public class OrderInterceptor extends ChannelInterceptorBase {
     private int maxQueue = Integer.MAX_VALUE;
 
     public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
+        if ( !okToProcess(msg.getOptions()) ) {
+            super.sendMessage(destination, msg, payload);
+            return;
+        }
         for ( int i=0; i<destination.length; i++ ) {
             int nr = incCounter(destination[i]);
             //reduce byte copy
@@ -73,6 +77,10 @@ public class OrderInterceptor extends ChannelInterceptorBase {
     }
 
     public void messageReceived(ChannelMessage msg) {
+        if ( !okToProcess(msg.getOptions()) ) {
+            super.messageReceived(msg);
+            return;
+        }
         int msgnr = XByteBuffer.toInt(msg.getMessage().getBytesDirect(),msg.getMessage().getLength()-4);
         msg.getMessage().trim(4);
         MessageOrder order = new MessageOrder(msgnr,(ChannelMessage)msg.deepclone());