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 java.lang.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.
- Version:
- $Revision: 1.15 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IndirectMessageReference
public IndirectMessageReference(Queue destination,
MessageStore destinationStore,
Message 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 java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
incrementRedeliveryCounter
public void incrementRedeliveryCounter()
- Specified by:
incrementRedeliveryCounter
in interface MessageReference
isDropped
public boolean isDropped()
- 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 void 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 Destination 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 java.lang.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()
- Description copied from interface:
MessageReference
- Returns true if this message is expired
- Specified by:
isExpired
in interface MessageReference
getSize
public int getSize()
- Specified by:
getSize
in interface MessageReference
Copyright © 2009 Apache Software Foundation. All Rights Reserved.