activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r705305 - in /activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command: ActiveMQDestination.java Message.java MessageId.java
Date Thu, 16 Oct 2008 18:11:33 GMT
Author: chirino
Date: Thu Oct 16 11:11:32 2008
New Revision: 705305

URL: http://svn.apache.org/viewvc?rev=705305&view=rev
Log:
A few optimizations

Modified:
    activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java
    activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/Message.java
    activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java

Modified: activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java?rev=705305&r1=705304&r2=705305&view=diff
==============================================================================
--- activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java
(original)
+++ activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java
Thu Oct 16 11:11:32 2008
@@ -234,7 +234,9 @@
                 throw new IllegalArgumentException("Invalid destination name: " + physicalName
+ ", it's options are not encoded properly: " + e);
             }
         }
-        this.pb.setName(physicalName);
+        if( !physicalName.equals(pb.getName()) ) {
+            this.pb.setName(physicalName);
+        }
         this.destinationPaths = null;
         this.hashValue = 0;
         if (composite) {

Modified: activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/Message.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/Message.java?rev=705305&r1=705304&r2=705305&view=diff
==============================================================================
--- activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/Message.java
(original)
+++ activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/Message.java
Thu Oct 16 11:11:32 2008
@@ -72,6 +72,10 @@
 
     private ActiveMQDestination destination;
 
+    private long brokerInTime;
+
+    private long brokerOutTime;
+
     public Message(PBMessage pb) {
         this.pb = pb;
     }
@@ -746,22 +750,22 @@
      * @openwire:property version=3
      */
     public long getBrokerInTime() {
-        return this.pb.getBrokerInTime();
+        return brokerInTime;
     }
 
     public void setBrokerInTime(long brokerInTime) {
-        this.pb.setBrokerInTime(brokerInTime);
+        this.brokerInTime=brokerInTime;
     }
 
     /**
      * @openwire:property version=3
      */
     public long getBrokerOutTime() {
-        return this.pb.getBrokerOutTime();
+        return brokerOutTime;
     }
 
     public void setBrokerOutTime(long brokerOutTime) {
-        this.pb.setBrokerOutTime(brokerOutTime);
+        this.brokerOutTime=brokerOutTime;
     }
     
     public boolean isDropped() {

Modified: activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java?rev=705305&r1=705304&r2=705305&view=diff
==============================================================================
--- activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java
(original)
+++ activemq/sandbox/chirino-pb/activemq-core/src/main/java/org/apache/activemq/command/MessageId.java
Thu Oct 16 11:11:32 2008
@@ -29,6 +29,8 @@
 
     protected PBMessageId pb = new PBMessageId();
 
+    private long brokerSequenceId;
+
     public MessageId() {
     }
 
@@ -133,11 +135,11 @@
      * @openwire:property version=1
      */
     public long getBrokerSequenceId() {
-        return pb.getBrokerSequenceId();
+        return brokerSequenceId;
     }
 
     public void setBrokerSequenceId(long brokerSequenceId) {
-        this.pb.setBrokerSequenceId(brokerSequenceId);
+        this.brokerSequenceId = brokerSequenceId;
     }
 
     public boolean isMarshallAware() {



Mime
View raw message