Class NullMessageReference
- java.lang.Object
-
- org.apache.activemq.broker.region.NullMessageReference
-
- All Implemented Interfaces:
MessageReference
,QueueMessageReference
public final class NullMessageReference extends Object implements QueueMessageReference
Used by theQueueMessageReference.NULL_MESSAGE
-
-
Field Summary
-
Fields inherited from interface org.apache.activemq.broker.region.QueueMessageReference
NULL_MESSAGE
-
-
Constructor Summary
Constructors Constructor Description NullMessageReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canProcessAsExpired()
int
decrementReferenceCount()
void
drop()
boolean
dropIfLive()
long
getExpiration()
String
getGroupID()
int
getGroupSequence()
LockOwner
getLockOwner()
Message
getMessage()
Message
getMessageHardRef()
MessageId
getMessageId()
int
getRedeliveryCounter()
int
getReferenceCount()
Destination
getRegionDestination()
int
getSize()
ConsumerId
getTargetConsumerId()
void
incrementRedeliveryCounter()
int
incrementReferenceCount()
boolean
isAcked()
boolean
isAdvisory()
boolean
isDropped()
Returns true if this message is dropped.boolean
isExpired()
Returns true if this message is expiredboolean
isPersistent()
boolean
lock(LockOwner subscription)
void
setAcked(boolean b)
boolean
unlock()
-
-
-
Method Detail
-
drop
public void drop()
- Specified by:
drop
in interfaceQueueMessageReference
-
dropIfLive
public boolean dropIfLive()
- Specified by:
dropIfLive
in interfaceQueueMessageReference
-
getLockOwner
public LockOwner getLockOwner()
- Specified by:
getLockOwner
in interfaceQueueMessageReference
-
isAcked
public boolean isAcked()
- Specified by:
isAcked
in interfaceQueueMessageReference
-
isDropped
public boolean isDropped()
Description copied from interface:MessageReference
Returns true if this message is dropped.- Specified by:
isDropped
in interfaceMessageReference
- Specified by:
isDropped
in interfaceQueueMessageReference
-
lock
public boolean lock(LockOwner subscription)
- Specified by:
lock
in interfaceQueueMessageReference
-
setAcked
public void setAcked(boolean b)
- Specified by:
setAcked
in interfaceQueueMessageReference
-
unlock
public boolean unlock()
- Specified by:
unlock
in interfaceQueueMessageReference
-
decrementReferenceCount
public int decrementReferenceCount()
- Specified by:
decrementReferenceCount
in interfaceMessageReference
-
getExpiration
public long getExpiration()
- Specified by:
getExpiration
in interfaceMessageReference
-
getGroupID
public String getGroupID()
- Specified by:
getGroupID
in interfaceMessageReference
-
getGroupSequence
public int getGroupSequence()
- Specified by:
getGroupSequence
in interfaceMessageReference
-
getMessage
public Message getMessage()
- Specified by:
getMessage
in interfaceMessageReference
-
getMessageHardRef
public Message getMessageHardRef()
- Specified by:
getMessageHardRef
in interfaceMessageReference
-
getMessageId
public MessageId getMessageId()
- Specified by:
getMessageId
in interfaceMessageReference
-
getRedeliveryCounter
public int getRedeliveryCounter()
- Specified by:
getRedeliveryCounter
in interfaceMessageReference
-
getReferenceCount
public int getReferenceCount()
- Specified by:
getReferenceCount
in interfaceMessageReference
-
getRegionDestination
public Destination getRegionDestination()
- Specified by:
getRegionDestination
in interfaceMessageReference
-
getSize
public int getSize()
- Specified by:
getSize
in interfaceMessageReference
-
getTargetConsumerId
public ConsumerId getTargetConsumerId()
- Specified by:
getTargetConsumerId
in interfaceMessageReference
-
incrementRedeliveryCounter
public void incrementRedeliveryCounter()
- Specified by:
incrementRedeliveryCounter
in interfaceMessageReference
-
incrementReferenceCount
public int incrementReferenceCount()
- Specified by:
incrementReferenceCount
in interfaceMessageReference
-
isExpired
public boolean isExpired()
Description copied from interface:MessageReference
Returns true if this message is expired- Specified by:
isExpired
in interfaceMessageReference
-
isPersistent
public boolean isPersistent()
- Specified by:
isPersistent
in interfaceMessageReference
-
isAdvisory
public boolean isAdvisory()
- Specified by:
isAdvisory
in interfaceMessageReference
- Returns:
- true if the message is an advisory
-
canProcessAsExpired
public boolean canProcessAsExpired()
- Specified by:
canProcessAsExpired
in interfaceMessageReference
-
-