activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1075864 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
Date Tue, 01 Mar 2011 16:00:00 GMT
Author: gtully
Date: Tue Mar  1 15:59:59 2011
New Revision: 1075864

URL: http://svn.apache.org/viewvc?rev=1075864&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3193 - implement equals for indirect message ref,
so remove from pendingdispatch will work on moveMessages

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java?rev=1075864&r1=1075863&r2=1075864&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/IndirectMessageReference.java
Tue Mar  1 15:59:59 2011
@@ -72,6 +72,17 @@ public class IndirectMessageReference im
         return "Message " + message.getMessageId() + " dropped=" + dropped + " acked=" +
acked + " locked=" + (lockOwner != null);
     }
 
+    @Override
+    public boolean equals(Object obj) {
+        return this == obj || (obj instanceof IndirectMessageReference &&
+                message.getMessageId().equals(((IndirectMessageReference)obj).getMessage().getMessageId()));
+    }
+
+    @Override
+    public int hashCode() {
+        return message.hashCode();
+    }
+
     public void incrementRedeliveryCounter() {
         message.incrementRedeliveryCounter();
     }



Mime
View raw message