activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r583237 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAudit.java
Date Tue, 09 Oct 2007 17:45:55 GMT
Author: rajdavies
Date: Tue Oct  9 10:45:54 2007
New Revision: 583237

URL: http://svn.apache.org/viewvc?rev=583237&view=rev
Log:
add some more useful methods 

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAudit.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAudit.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAudit.java?rev=583237&r1=583236&r2=583237&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAudit.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageAudit.java
Tue Oct  9 10:45:54 2007
@@ -96,14 +96,25 @@
     }
 
     /**
-     * Checks if this message has beeb seen before
+     * Checks if this message has been seen before
      * 
      * @param message
      * @return true if the message is a duplicate
      */
-    public synchronized boolean isDuplicateMessageReference(final MessageReference message)
{
-        boolean answer = false;
+    public boolean isDuplicateMessageReference(final MessageReference message) {
         MessageId id = message.getMessageId();
+        return isDuplicateMessageId(id);
+    }
+    
+    /**
+     * Checks if this messageId has been seen before
+     * 
+     * @param id
+     * @return true if the message is a duplicate
+     */
+    public synchronized boolean isDuplicateMessageId(final MessageId id) {
+        boolean answer = false;
+        
         if (id != null) {
             ProducerId pid = id.getProducerId();
             if (pid != null) {
@@ -119,12 +130,21 @@
     }
 
     /**
-     * uun mark this messager as being received
+     * mark this message as being received
      * 
      * @param message
      */
-    public synchronized void rollbackMessageReference(final MessageReference message) {
+    public void rollbackMessageReference(final MessageReference message) {
         MessageId id = message.getMessageId();
+        rollbackMessageId(id);
+    }
+    
+    /**
+     * mark this message as being received
+     * 
+     * @param id
+     */
+    public synchronized void rollbackMessageId(final  MessageId id) {
         if (id != null) {
             ProducerId pid = id.getProducerId();
             if (pid != null) {



Mime
View raw message