org.apache.activemq.broker.region
Class IndirectMessageReference
java.lang.Object
org.apache.activemq.broker.region.IndirectMessageReference
- All Implemented Interfaces:
- MessageReference, QueueMessageReference
public class IndirectMessageReference
- extends Object
- implements QueueMessageReference
Keeps track of a message that is flowing through the Broker. This object may
hold a hard reference to the message or only hold the id of the message if
the message has been persisted on in a MessageStore.
IndirectMessageReference
public IndirectMessageReference(Message message)
- Parameters:
message -
getMessageHardRef
public Message getMessageHardRef()
- Specified by:
getMessageHardRef in interface MessageReference
getReferenceCount
public int getReferenceCount()
- Specified by:
getReferenceCount in interface MessageReference
incrementReferenceCount
public int incrementReferenceCount()
- Specified by:
incrementReferenceCount in interface MessageReference
decrementReferenceCount
public int decrementReferenceCount()
- Specified by:
decrementReferenceCount in interface MessageReference
getMessage
public Message getMessage()
- Specified by:
getMessage in interface MessageReference
toString
public String toString()
- Overrides:
toString in class Object
incrementRedeliveryCounter
public void incrementRedeliveryCounter()
- Specified by:
incrementRedeliveryCounter in interface MessageReference
isDropped
public boolean isDropped()
- Specified by:
isDropped in interface MessageReference- Specified by:
isDropped in interface QueueMessageReference
drop
public void drop()
- Specified by:
drop in interface QueueMessageReference
lock
public boolean lock(LockOwner subscription)
- Specified by:
lock in interface QueueMessageReference
unlock
public boolean unlock()
- Specified by:
unlock in interface QueueMessageReference
getLockOwner
public LockOwner getLockOwner()
- Specified by:
getLockOwner in interface QueueMessageReference
getRedeliveryCounter
public int getRedeliveryCounter()
- Specified by:
getRedeliveryCounter in interface MessageReference
getMessageId
public MessageId getMessageId()
- Specified by:
getMessageId in interface MessageReference
getRegionDestination
public Message.MessageDestination getRegionDestination()
- Specified by:
getRegionDestination in interface MessageReference
isPersistent
public boolean isPersistent()
- Specified by:
isPersistent in interface MessageReference
isLocked
public boolean isLocked()
isAcked
public boolean isAcked()
- Specified by:
isAcked in interface QueueMessageReference
setAcked
public void setAcked(boolean b)
- Specified by:
setAcked in interface QueueMessageReference
getGroupID
public String getGroupID()
- Specified by:
getGroupID in interface MessageReference
getGroupSequence
public int getGroupSequence()
- Specified by:
getGroupSequence in interface MessageReference
getTargetConsumerId
public ConsumerId getTargetConsumerId()
- Specified by:
getTargetConsumerId in interface MessageReference
getExpiration
public long getExpiration()
- Specified by:
getExpiration in interface MessageReference
isExpired
public boolean isExpired()
- Specified by:
isExpired in interface MessageReference
getSize
public int getSize()
- Specified by:
getSize in interface MessageReference
isAdvisory
public boolean isAdvisory()
- Specified by:
isAdvisory in interface MessageReference
Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.