org.apache.activemq
Class ActiveMQMessageAudit

java.lang.Object
  extended by org.apache.activemq.ActiveMQMessageAuditNoSync
      extended by org.apache.activemq.ActiveMQMessageAudit
All Implemented Interfaces:
Serializable

public class ActiveMQMessageAudit
extends ActiveMQMessageAuditNoSync

Provides basic audit functions for Messages

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.activemq.ActiveMQMessageAuditNoSync
DEFAULT_WINDOW_SIZE, MAXIMUM_PRODUCER_COUNT
 
Constructor Summary
ActiveMQMessageAudit()
          Default Constructor windowSize = 2048, maximumNumberOfProducersToTrack = 64
ActiveMQMessageAudit(int auditDepth, int maximumNumberOfProducersToTrack)
          Construct a MessageAudit
 
Method Summary
 boolean isDuplicate(MessageId id)
          Checks if this messageId has been seen before
 boolean isDuplicate(String id)
          checks whether this messageId has been seen before and adds this messageId to the list
 boolean isInOrder(MessageId id)
          Check the MessageId is in order
 boolean isInOrder(String id)
          Check the message id is in order
 void rollback(MessageId id)
          mark this message as being received
 void setMaximumNumberOfProducersToTrack(int maximumNumberOfProducersToTrack)
           
 
Methods inherited from class org.apache.activemq.ActiveMQMessageAuditNoSync
clear, getAuditDepth, getLastSeqId, getMaximumNumberOfProducersToTrack, isDuplicate, isDuplicate, isInOrder, isInOrder, isModified, modified, rollback, rollback, setAuditDepth, setModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveMQMessageAudit

public ActiveMQMessageAudit()
Default Constructor windowSize = 2048, maximumNumberOfProducersToTrack = 64


ActiveMQMessageAudit

public ActiveMQMessageAudit(int auditDepth,
                            int maximumNumberOfProducersToTrack)
Construct a MessageAudit

Parameters:
auditDepth - range of ids to track
maximumNumberOfProducersToTrack - number of producers expected in the system
Method Detail

isDuplicate

public boolean isDuplicate(String id)
Description copied from class: ActiveMQMessageAuditNoSync
checks whether this messageId has been seen before and adds this messageId to the list

Overrides:
isDuplicate in class ActiveMQMessageAuditNoSync
Returns:
true if the message is a duplicate

isDuplicate

public boolean isDuplicate(MessageId id)
Description copied from class: ActiveMQMessageAuditNoSync
Checks if this messageId has been seen before

Overrides:
isDuplicate in class ActiveMQMessageAuditNoSync
Returns:
true if the message is a duplicate

rollback

public void rollback(MessageId id)
Description copied from class: ActiveMQMessageAuditNoSync
mark this message as being received

Overrides:
rollback in class ActiveMQMessageAuditNoSync

isInOrder

public boolean isInOrder(String id)
Description copied from class: ActiveMQMessageAuditNoSync
Check the message id is in order

Overrides:
isInOrder in class ActiveMQMessageAuditNoSync
Returns:

isInOrder

public boolean isInOrder(MessageId id)
Description copied from class: ActiveMQMessageAuditNoSync
Check the MessageId is in order

Overrides:
isInOrder in class ActiveMQMessageAuditNoSync
Returns:

setMaximumNumberOfProducersToTrack

public void setMaximumNumberOfProducersToTrack(int maximumNumberOfProducersToTrack)
Overrides:
setMaximumNumberOfProducersToTrack in class ActiveMQMessageAuditNoSync
Parameters:
maximumNumberOfProducersToTrack - the maximumNumberOfProducersToTrack to set


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.