Class IndirectMessageReference
java.lang.Object
org.apache.activemq.broker.region.IndirectMessageReference
- All Implemented Interfaces:
org.apache.activemq.broker.region.MessageReference,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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanintvoiddrop()booleanCheck if the message has already been dropped before dropping.longintorg.apache.activemq.command.Messageorg.apache.activemq.command.Messageorg.apache.activemq.command.MessageIdintintorg.apache.activemq.command.Message.MessageDestinationintgetSize()org.apache.activemq.command.ConsumerIdvoidintbooleanisAcked()booleanbooleanbooleanbooleanisLocked()booleanbooleanvoidsetAcked(boolean b) toString()booleanunlock()
-
Constructor Details
-
IndirectMessageReference
public IndirectMessageReference(org.apache.activemq.command.Message message) - Parameters:
message-
-
-
Method Details
-
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
-
toString
-
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
- Specified by:
lockin interfaceQueueMessageReference
-
unlock
public boolean unlock()- Specified by:
unlockin interfaceQueueMessageReference
-
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
- 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
-