Class IndirectMessageReference
- java.lang.Object
-
- org.apache.activemq.broker.region.IndirectMessageReference
-
- All Implemented Interfaces:
org.apache.activemq.broker.region.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.
-
-
Field Summary
-
Fields inherited from interface org.apache.activemq.broker.region.QueueMessageReference
NULL_MESSAGE
-
-
Constructor Summary
Constructors Constructor Description IndirectMessageReference(org.apache.activemq.command.Message message)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanProcessAsExpired()intdecrementReferenceCount()voiddrop()booleandropIfLive()Check if the message has already been dropped before dropping.longgetExpiration()StringgetGroupID()intgetGroupSequence()LockOwnergetLockOwner()org.apache.activemq.command.MessagegetMessage()org.apache.activemq.command.MessagegetMessageHardRef()org.apache.activemq.command.MessageIdgetMessageId()intgetRedeliveryCounter()intgetReferenceCount()org.apache.activemq.command.Message.MessageDestinationgetRegionDestination()intgetSize()org.apache.activemq.command.ConsumerIdgetTargetConsumerId()voidincrementRedeliveryCounter()intincrementReferenceCount()booleanisAcked()booleanisAdvisory()booleanisDropped()booleanisExpired()booleanisLocked()booleanisPersistent()booleanlock(LockOwner subscription)voidsetAcked(boolean b)StringtoString()booleanunlock()
-
-
-
Method Detail
-
getMessageHardRef
public org.apache.activemq.command.Message getMessageHardRef()
- Specified by:
getMessageHardRefin interfaceorg.apache.activemq.broker.region.MessageReference
-
getReferenceCount
public int getReferenceCount()
- Specified by:
getReferenceCountin interfaceorg.apache.activemq.broker.region.MessageReference
-
incrementReferenceCount
public int incrementReferenceCount()
- Specified by:
incrementReferenceCountin interfaceorg.apache.activemq.broker.region.MessageReference
-
decrementReferenceCount
public int decrementReferenceCount()
- Specified by:
decrementReferenceCountin interfaceorg.apache.activemq.broker.region.MessageReference
-
getMessage
public org.apache.activemq.command.Message getMessage()
- Specified by:
getMessagein interfaceorg.apache.activemq.broker.region.MessageReference
-
incrementRedeliveryCounter
public void incrementRedeliveryCounter()
- Specified by:
incrementRedeliveryCounterin interfaceorg.apache.activemq.broker.region.MessageReference
-
isDropped
public boolean isDropped()
- Specified by:
isDroppedin interfaceorg.apache.activemq.broker.region.MessageReference- Specified by:
isDroppedin interfaceQueueMessageReference
-
drop
public void drop()
- Specified by:
dropin interfaceQueueMessageReference
-
dropIfLive
public boolean dropIfLive()
Check if the message has already been dropped before dropping. Return true if dropped, else false. This method exists so that this can be done atomically under the intrinisic lock- Specified by:
dropIfLivein interfaceQueueMessageReference
-
lock
public boolean lock(LockOwner subscription)
- Specified by:
lockin interfaceQueueMessageReference
-
unlock
public boolean unlock()
- Specified by:
unlockin interfaceQueueMessageReference
-
getLockOwner
public LockOwner getLockOwner()
- Specified by:
getLockOwnerin interfaceQueueMessageReference
-
getRedeliveryCounter
public int getRedeliveryCounter()
- Specified by:
getRedeliveryCounterin interfaceorg.apache.activemq.broker.region.MessageReference
-
getMessageId
public org.apache.activemq.command.MessageId getMessageId()
- Specified by:
getMessageIdin interfaceorg.apache.activemq.broker.region.MessageReference
-
getRegionDestination
public org.apache.activemq.command.Message.MessageDestination getRegionDestination()
- Specified by:
getRegionDestinationin interfaceorg.apache.activemq.broker.region.MessageReference
-
isPersistent
public boolean isPersistent()
- Specified by:
isPersistentin interfaceorg.apache.activemq.broker.region.MessageReference
-
isLocked
public boolean isLocked()
-
isAcked
public boolean isAcked()
- Specified by:
isAckedin interfaceQueueMessageReference
-
setAcked
public void setAcked(boolean b)
- Specified by:
setAckedin interfaceQueueMessageReference
-
getGroupID
public String getGroupID()
- Specified by:
getGroupIDin interfaceorg.apache.activemq.broker.region.MessageReference
-
getGroupSequence
public int getGroupSequence()
- Specified by:
getGroupSequencein interfaceorg.apache.activemq.broker.region.MessageReference
-
getTargetConsumerId
public org.apache.activemq.command.ConsumerId getTargetConsumerId()
- Specified by:
getTargetConsumerIdin interfaceorg.apache.activemq.broker.region.MessageReference
-
getExpiration
public long getExpiration()
- Specified by:
getExpirationin interfaceorg.apache.activemq.broker.region.MessageReference
-
isExpired
public boolean isExpired()
- Specified by:
isExpiredin interfaceorg.apache.activemq.broker.region.MessageReference
-
getSize
public int getSize()
- Specified by:
getSizein interfaceorg.apache.activemq.broker.region.MessageReference
-
isAdvisory
public boolean isAdvisory()
- Specified by:
isAdvisoryin interfaceorg.apache.activemq.broker.region.MessageReference
-
canProcessAsExpired
public boolean canProcessAsExpired()
- Specified by:
canProcessAsExpiredin interfaceorg.apache.activemq.broker.region.MessageReference
-
-