activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r397960 - in /incubator/activemq/trunk: activemq-core/src/main/java/org/apache/activemq/command/ activemq-core/src/main/java/org/apache/activemq/openwire/v1/ activemq-core/src/test/java/org/apache/activemq/openwire/v1/ activemq-dotnet/src/m...
Date Fri, 28 Apr 2006 17:27:02 GMT
Author: chirino
Date: Fri Apr 28 10:26:59 2006
New Revision: 397960

URL: http://svn.apache.org/viewcvs?rev=397960&view=rev
Log:
Added a 'noRangeAcks' flag to the ConsumerInfo command


Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerInfoMarshaller.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java
    incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/BrokerInfo.cs
    incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ConnectionInfo.cs
    incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ConsumerInfo.cs
    incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/BrokerInfoMarshaller.cs
    incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/ConnectionInfoMarshaller.cs
    incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/ConsumerInfoMarshaller.cs
    incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/MarshallerFactory.cs
    incubator/activemq/trunk/openwire-c/src/libopenwire/ow_commands_v1.c
    incubator/activemq/trunk/openwire-c/src/libopenwire/ow_commands_v1.h

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java?rev=397960&r1=397959&r2=397960&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java
Fri Apr 28 10:26:59 2006
@@ -50,6 +50,7 @@
     protected BrokerId[] brokerPath;
     protected boolean optimizedAcknowledge;
     protected transient int currentPrefetchSize;//used by the broker
+    protected boolean noRangeAcks;  // if true, the consumer will not send range acks.
     
     protected BooleanExpression additionalPredicate;
     protected transient boolean networkSubscription; //this subscription originated from
a network connection
@@ -336,6 +337,21 @@
      */
     public void setCurrentPrefetchSize(int currentPrefetchSize){
         this.currentPrefetchSize=currentPrefetchSize;
+    }
+
+    /**
+     * The broker may be able to optimize it's processing or provides better
+     * QOS if it knows the consumer will not be sending ranged acks.
+     * 
+     * @return true if the consumer will not send range acks.
+     * @openwire:property version=1
+     */
+    public boolean isNoRangeAcks() {
+        return noRangeAcks;
+    }
+
+    public void setNoRangeAcks(boolean noRangeAcks) {
+        this.noRangeAcks = noRangeAcks;
     }
 
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerInfoMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerInfoMarshaller.java?rev=397960&r1=397959&r2=397960&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerInfoMarshaller.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerInfoMarshaller.java
Fri Apr 28 10:26:59 2006
@@ -92,6 +92,7 @@
         info.setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression) tightUnmarsalNestedObject(wireFormat,
dataIn, bs));
         info.setNetworkSubscription(bs.readBoolean());
         info.setOptimizedAcknowledge(bs.readBoolean());
+        info.setNoRangeAcks(bs.readBoolean());
 
     }
 
@@ -117,6 +118,7 @@
         rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getAdditionalPredicate(),
bs);
         bs.writeBoolean(info.isNetworkSubscription());
         bs.writeBoolean(info.isOptimizedAcknowledge());
+        bs.writeBoolean(info.isNoRangeAcks());
 
         return rc + 9;
     }
@@ -148,6 +150,7 @@
         tightMarshalNestedObject2(wireFormat, (DataStructure)info.getAdditionalPredicate(),
dataOut, bs);
         bs.readBoolean();
         bs.readBoolean();
+        bs.readBoolean();
 
     }
 
@@ -189,6 +192,7 @@
         info.setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression) looseUnmarsalNestedObject(wireFormat,
dataIn));
         info.setNetworkSubscription(dataIn.readBoolean());
         info.setOptimizedAcknowledge(dataIn.readBoolean());
+        info.setNoRangeAcks(dataIn.readBoolean());
 
     }
 
@@ -217,6 +221,7 @@
         looseMarshalNestedObject(wireFormat, (DataStructure)info.getAdditionalPredicate(),
dataOut);
         dataOut.writeBoolean(info.isNetworkSubscription());
         dataOut.writeBoolean(info.isOptimizedAcknowledge());
+        dataOut.writeBoolean(info.isNoRangeAcks());
 
     }
 }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java?rev=397960&r1=397959&r2=397960&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java
Fri Apr 28 10:26:59 2006
@@ -73,6 +73,7 @@
         info.setAdditionalPredicate(createBooleanExpression("AdditionalPredicate:6"));
         info.setNetworkSubscription(false);
         info.setOptimizedAcknowledge(true);
+        info.setNoRangeAcks(false);
 
             }
         }

Modified: incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/BrokerInfo.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/BrokerInfo.cs?rev=397960&r1=397959&r2=397960&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/BrokerInfo.cs
(original)
+++ incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/BrokerInfo.cs
Fri Apr 28 10:26:59 2006
@@ -41,6 +41,8 @@
         BrokerInfo[] peerBrokerInfos;
         string brokerName;
         bool slaveBroker;
+        bool masterBroker;
+        bool faultTolerantConfiguration;
 
 		public override string ToString() {
             return GetType().Name + "["
@@ -49,6 +51,8 @@
                 + " PeerBrokerInfos=" + PeerBrokerInfos
                 + " BrokerName=" + BrokerName
                 + " SlaveBroker=" + SlaveBroker
+                + " MasterBroker=" + MasterBroker
+                + " FaultTolerantConfiguration=" + FaultTolerantConfiguration
                 + " ]";
 
 		}
@@ -90,6 +94,18 @@
         {
             get { return slaveBroker; }
             set { this.slaveBroker = value; }            
+        }
+
+        public bool MasterBroker
+        {
+            get { return masterBroker; }
+            set { this.masterBroker = value; }            
+        }
+
+        public bool FaultTolerantConfiguration
+        {
+            get { return faultTolerantConfiguration; }
+            set { this.faultTolerantConfiguration = value; }            
         }
 
     }

Modified: incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ConnectionInfo.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ConnectionInfo.cs?rev=397960&r1=397959&r2=397960&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ConnectionInfo.cs
(original)
+++ incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ConnectionInfo.cs
Fri Apr 28 10:26:59 2006
@@ -41,6 +41,8 @@
         string password;
         string userName;
         BrokerId[] brokerPath;
+        bool brokerMasterConnector;
+        bool manageable;
 
 		public override string ToString() {
             return GetType().Name + "["
@@ -49,6 +51,8 @@
                 + " Password=" + Password
                 + " UserName=" + UserName
                 + " BrokerPath=" + BrokerPath
+                + " BrokerMasterConnector=" + BrokerMasterConnector
+                + " Manageable=" + Manageable
                 + " ]";
 
 		}
@@ -90,6 +94,18 @@
         {
             get { return brokerPath; }
             set { this.brokerPath = value; }            
+        }
+
+        public bool BrokerMasterConnector
+        {
+            get { return brokerMasterConnector; }
+            set { this.brokerMasterConnector = value; }            
+        }
+
+        public bool Manageable
+        {
+            get { return manageable; }
+            set { this.manageable = value; }            
         }
 
     }

Modified: incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ConsumerInfo.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ConsumerInfo.cs?rev=397960&r1=397959&r2=397960&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ConsumerInfo.cs
(original)
+++ incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ConsumerInfo.cs
Fri Apr 28 10:26:59 2006
@@ -51,6 +51,8 @@
         BrokerId[] brokerPath;
         BooleanExpression additionalPredicate;
         bool networkSubscription;
+        bool optimizedAcknowledge;
+        bool noRangeAcks;
 
 		public override string ToString() {
             return GetType().Name + "["
@@ -69,6 +71,8 @@
                 + " BrokerPath=" + BrokerPath
                 + " AdditionalPredicate=" + AdditionalPredicate
                 + " NetworkSubscription=" + NetworkSubscription
+                + " OptimizedAcknowledge=" + OptimizedAcknowledge
+                + " NoRangeAcks=" + NoRangeAcks
                 + " ]";
 
 		}
@@ -170,6 +174,18 @@
         {
             get { return networkSubscription; }
             set { this.networkSubscription = value; }            
+        }
+
+        public bool OptimizedAcknowledge
+        {
+            get { return optimizedAcknowledge; }
+            set { this.optimizedAcknowledge = value; }            
+        }
+
+        public bool NoRangeAcks
+        {
+            get { return noRangeAcks; }
+            set { this.noRangeAcks = value; }            
         }
 
     }

Modified: incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/BrokerInfoMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/BrokerInfoMarshaller.cs?rev=397960&r1=397959&r2=397960&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/BrokerInfoMarshaller.cs
(original)
+++ incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/BrokerInfoMarshaller.cs
Fri Apr 28 10:26:59 2006
@@ -72,6 +72,8 @@
         }
         info.BrokerName = TightUnmarshalString(dataIn, bs);
         info.SlaveBroker = bs.ReadBoolean();
+        info.MasterBroker = bs.ReadBoolean();
+        info.FaultTolerantConfiguration = bs.ReadBoolean();
 
     }
 
@@ -87,6 +89,8 @@
         rc += TightMarshalObjectArray1(wireFormat, info.PeerBrokerInfos, bs);
         rc += TightMarshalString1(info.BrokerName, bs);
         bs.WriteBoolean(info.SlaveBroker);
+        bs.WriteBoolean(info.MasterBroker);
+        bs.WriteBoolean(info.FaultTolerantConfiguration);
 
         return rc + 0;
     }
@@ -103,6 +107,8 @@
         TightMarshalObjectArray2(wireFormat, info.PeerBrokerInfos, dataOut, bs);
         TightMarshalString2(info.BrokerName, dataOut, bs);
         bs.ReadBoolean();
+        bs.ReadBoolean();
+        bs.ReadBoolean();
 
     }
 
@@ -130,6 +136,8 @@
         }
         info.BrokerName = LooseUnmarshalString(dataIn);
         info.SlaveBroker = dataIn.ReadBoolean();
+        info.MasterBroker = dataIn.ReadBoolean();
+        info.FaultTolerantConfiguration = dataIn.ReadBoolean();
 
     }
 
@@ -146,6 +154,8 @@
         LooseMarshalObjectArray(wireFormat, info.PeerBrokerInfos, dataOut);
         LooseMarshalString(info.BrokerName, dataOut);
         dataOut.Write(info.SlaveBroker);
+        dataOut.Write(info.MasterBroker);
+        dataOut.Write(info.FaultTolerantConfiguration);
 
     }
     

Modified: incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/ConnectionInfoMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/ConnectionInfoMarshaller.cs?rev=397960&r1=397959&r2=397960&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/ConnectionInfoMarshaller.cs
(original)
+++ incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/ConnectionInfoMarshaller.cs
Fri Apr 28 10:26:59 2006
@@ -72,6 +72,8 @@
         else {
             info.BrokerPath = null;
         }
+        info.BrokerMasterConnector = bs.ReadBoolean();
+        info.Manageable = bs.ReadBoolean();
 
     }
 
@@ -87,6 +89,8 @@
         rc += TightMarshalString1(info.Password, bs);
         rc += TightMarshalString1(info.UserName, bs);
         rc += TightMarshalObjectArray1(wireFormat, info.BrokerPath, bs);
+        bs.WriteBoolean(info.BrokerMasterConnector);
+        bs.WriteBoolean(info.Manageable);
 
         return rc + 0;
     }
@@ -103,6 +107,8 @@
         TightMarshalString2(info.Password, dataOut, bs);
         TightMarshalString2(info.UserName, dataOut, bs);
         TightMarshalObjectArray2(wireFormat, info.BrokerPath, dataOut, bs);
+        bs.ReadBoolean();
+        bs.ReadBoolean();
 
     }
 
@@ -130,6 +136,8 @@
         else {
             info.BrokerPath = null;
         }
+        info.BrokerMasterConnector = dataIn.ReadBoolean();
+        info.Manageable = dataIn.ReadBoolean();
 
     }
 
@@ -146,6 +154,8 @@
         LooseMarshalString(info.Password, dataOut);
         LooseMarshalString(info.UserName, dataOut);
         LooseMarshalObjectArray(wireFormat, info.BrokerPath, dataOut);
+        dataOut.Write(info.BrokerMasterConnector);
+        dataOut.Write(info.Manageable);
 
     }
     

Modified: incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/ConsumerInfoMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/ConsumerInfoMarshaller.cs?rev=397960&r1=397959&r2=397960&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/ConsumerInfoMarshaller.cs
(original)
+++ incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/ConsumerInfoMarshaller.cs
Fri Apr 28 10:26:59 2006
@@ -82,6 +82,8 @@
         }
         info.AdditionalPredicate = (BooleanExpression) TightUnmarshalNestedObject(wireFormat,
dataIn, bs);
         info.NetworkSubscription = bs.ReadBoolean();
+        info.OptimizedAcknowledge = bs.ReadBoolean();
+        info.NoRangeAcks = bs.ReadBoolean();
 
     }
 
@@ -104,6 +106,8 @@
         rc += TightMarshalObjectArray1(wireFormat, info.BrokerPath, bs);
         rc += TightMarshalNestedObject1(wireFormat, (DataStructure)info.AdditionalPredicate,
bs);
         bs.WriteBoolean(info.NetworkSubscription);
+        bs.WriteBoolean(info.OptimizedAcknowledge);
+        bs.WriteBoolean(info.NoRangeAcks);
 
         return rc + 9;
     }
@@ -130,6 +134,8 @@
         TightMarshalObjectArray2(wireFormat, info.BrokerPath, dataOut, bs);
         TightMarshalNestedObject2(wireFormat, (DataStructure)info.AdditionalPredicate, dataOut,
bs);
         bs.ReadBoolean();
+        bs.ReadBoolean();
+        bs.ReadBoolean();
 
     }
 
@@ -167,6 +173,8 @@
         }
         info.AdditionalPredicate = (BooleanExpression) LooseUnmarshalNestedObject(wireFormat,
dataIn);
         info.NetworkSubscription = dataIn.ReadBoolean();
+        info.OptimizedAcknowledge = dataIn.ReadBoolean();
+        info.NoRangeAcks = dataIn.ReadBoolean();
 
     }
 
@@ -193,6 +201,8 @@
         LooseMarshalObjectArray(wireFormat, info.BrokerPath, dataOut);
         LooseMarshalNestedObject(wireFormat, (DataStructure)info.AdditionalPredicate, dataOut);
         dataOut.Write(info.NetworkSubscription);
+        dataOut.Write(info.OptimizedAcknowledge);
+        dataOut.Write(info.NoRangeAcks);
 
     }
     

Modified: incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/MarshallerFactory.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/MarshallerFactory.cs?rev=397960&r1=397959&r2=397960&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/MarshallerFactory.cs
(original)
+++ incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/MarshallerFactory.cs
Fri Apr 28 10:26:59 2006
@@ -81,8 +81,10 @@
             format.addMarshaller(new DestinationInfoMarshaller());
             format.addMarshaller(new ShutdownInfoMarshaller());
             format.addMarshaller(new DataResponseMarshaller());
+            format.addMarshaller(new ConnectionControlMarshaller());
             format.addMarshaller(new KeepAliveInfoMarshaller());
             format.addMarshaller(new FlushCommandMarshaller());
+            format.addMarshaller(new ConsumerControlMarshaller());
             format.addMarshaller(new JournalTopicAckMarshaller());
             format.addMarshaller(new BrokerIdMarshaller());
             format.addMarshaller(new MessageDispatchMarshaller());

Modified: incubator/activemq/trunk/openwire-c/src/libopenwire/ow_commands_v1.c
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-c/src/libopenwire/ow_commands_v1.c?rev=397960&r1=397959&r2=397960&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-c/src/libopenwire/ow_commands_v1.c (original)
+++ incubator/activemq/trunk/openwire-c/src/libopenwire/ow_commands_v1.c Fri Apr 28 10:26:59
2006
@@ -1179,6 +1179,7 @@
    SUCCESS_CHECK(ow_marshal1_nested_object(buffer, (ow_DataStructure*)object->additionalPredicate));
    ow_bit_buffer_append(buffer, object->networkSubscription);
    ow_bit_buffer_append(buffer, object->optimizedAcknowledge);
+   ow_bit_buffer_append(buffer, object->noRangeAcks);
    
 	return APR_SUCCESS;
 }
@@ -1201,6 +1202,7 @@
    SUCCESS_CHECK(ow_marshal2_nested_object(buffer, bitbuffer, (ow_DataStructure*)object->additionalPredicate));
    ow_bit_buffer_read(bitbuffer);
    ow_bit_buffer_read(bitbuffer);
+   ow_bit_buffer_read(bitbuffer);
    
 	return APR_SUCCESS;
 }
@@ -1224,6 +1226,7 @@
    SUCCESS_CHECK(ow_unmarshal_nested_object(buffer, bitbuffer, (ow_DataStructure**)&object->additionalPredicate,
pool));
    object->networkSubscription = ow_bit_buffer_read(bitbuffer);
    object->optimizedAcknowledge = ow_bit_buffer_read(bitbuffer);
+   object->noRangeAcks = ow_bit_buffer_read(bitbuffer);
    
 	return APR_SUCCESS;
 }

Modified: incubator/activemq/trunk/openwire-c/src/libopenwire/ow_commands_v1.h
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-c/src/libopenwire/ow_commands_v1.h?rev=397960&r1=397959&r2=397960&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-c/src/libopenwire/ow_commands_v1.h (original)
+++ incubator/activemq/trunk/openwire-c/src/libopenwire/ow_commands_v1.h Fri Apr 28 10:26:59
2006
@@ -372,6 +372,7 @@
    struct ow_BooleanExpression *additionalPredicate;
    ow_boolean networkSubscription;
    ow_boolean optimizedAcknowledge;
+   ow_boolean noRangeAcks;
 
 } ow_ConsumerInfo;
 ow_ConsumerInfo *ow_ConsumerInfo_create(apr_pool_t *pool);



Mime
View raw message