public abstract class QueueEntryImpl extends Object implements QueueEntry
MessageInstance.AvailableState, MessageInstance.ConsumerAcquiredState<C extends ConsumerImpl>, MessageInstance.DeletedState, MessageInstance.DequeuedState, MessageInstance.EntryState, MessageInstance.LockedAcquiredState<C extends ConsumerImpl>, MessageInstance.NonConsumerAcquiredState, MessageInstance.State
AVAILABLE_STATE, DELETED_STATE, DEQUEUED_STATE, NON_CONSUMER_ACQUIRED_STATE
Constructor and Description |
---|
QueueEntryImpl(QueueEntryList queueEntryList) |
QueueEntryImpl(QueueEntryList queueEntryList,
ServerMessage message,
long entryId,
MessageEnqueueRecord enqueueRecord) |
QueueEntryImpl(QueueEntryList queueEntryList,
ServerMessage message,
MessageEnqueueRecord enqueueRecord) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getNextNode, getNextValidEntry
public QueueEntryImpl(QueueEntryList queueEntryList)
public QueueEntryImpl(QueueEntryList queueEntryList, ServerMessage message, long entryId, MessageEnqueueRecord enqueueRecord)
public QueueEntryImpl(QueueEntryList queueEntryList, ServerMessage message, MessageEnqueueRecord enqueueRecord)
public void setExpiration(long expiration)
setExpiration
in interface QueueEntry
public InstanceProperties getInstanceProperties()
getInstanceProperties
in interface MessageInstance
protected void setEntryId(long entryId)
protected long getEntryId()
public AMQQueue getQueue()
getQueue
in interface QueueEntry
public ServerMessage getMessage()
getMessage
in interface MessageInstance
public long getSize()
getSize
in interface QueueEntry
public boolean getDeliveredToConsumer()
getDeliveredToConsumer
in interface MessageInstance
public boolean expired()
expired
in interface MessageInstance
public boolean isAvailable()
isAvailable
in interface MessageInstance
public boolean isAcquired()
isAcquired
in interface MessageInstance
public boolean acquire()
acquire
in interface MessageInstance
public boolean acquireOrSteal(Runnable delayedAcquisitionTask)
acquireOrSteal
in interface QueueEntry
public boolean acquire(ConsumerImpl sub)
acquire
in interface MessageInstance
public boolean lockAcquisition(ConsumerImpl consumer)
lockAcquisition
in interface MessageInstance
public boolean unlockAcquisition()
unlockAcquisition
in interface MessageInstance
public boolean acquiredByConsumer()
acquiredByConsumer
in interface MessageInstance
public ConsumerImpl getAcquiringConsumer()
getAcquiringConsumer
in interface MessageInstance
public boolean isAcquiredBy(ConsumerImpl consumer)
isAcquiredBy
in interface MessageInstance
public boolean removeAcquisitionFromConsumer(ConsumerImpl consumer)
removeAcquisitionFromConsumer
in interface MessageInstance
public void release()
release
in interface MessageInstance
public void release(ConsumerImpl consumer)
release
in interface MessageInstance
public boolean checkHeld(long evaluationTime)
checkHeld
in interface QueueEntry
public QueueConsumer getDeliveredConsumer()
getDeliveredConsumer
in interface MessageInstance
getDeliveredConsumer
in interface QueueEntry
public void reject()
reject
in interface MessageInstance
public boolean isRejectedBy(ConsumerImpl consumer)
isRejectedBy
in interface MessageInstance
public void delete()
delete
in interface MessageInstance
public int routeToAlternate(Action<? super MessageInstance> action, ServerTransaction txn)
routeToAlternate
in interface MessageInstance
public boolean isQueueDeleted()
isQueueDeleted
in interface QueueEntry
public void addStateChangeListener(StateChangeListener<? super MessageInstance,MessageInstance.State> listener)
addStateChangeListener
in interface MessageInstance
public boolean removeStateChangeListener(StateChangeListener<? super MessageInstance,MessageInstance.State> listener)
removeStateChangeListener
in interface MessageInstance
public int compareTo(QueueEntry o)
compareTo
in interface Comparable<QueueEntry>
protected void onDelete()
public QueueEntryList getQueueEntryList()
public boolean isDeleted()
isDeleted
in interface MessageInstance
public int getDeliveryCount()
MessageInstance
getDeliveryCount
in interface MessageInstance
public int getMaximumDeliveryCount()
getMaximumDeliveryCount
in interface MessageInstance
public void incrementDeliveryCount()
incrementDeliveryCount
in interface MessageInstance
public void decrementDeliveryCount()
decrementDeliveryCount
in interface MessageInstance
public Filterable asFilterable()
asFilterable
in interface MessageInstance
public boolean resend()
resend
in interface MessageInstance
public TransactionLogResource getOwningResource()
getOwningResource
in interface MessageInstance
public void setRedelivered()
setRedelivered
in interface MessageInstance
public boolean isRedelivered()
isRedelivered
in interface MessageInstance
public MessageReference newMessageReference()
newMessageReference
in interface QueueEntry
public MessageEnqueueRecord getEnqueueRecord()
getEnqueueRecord
in interface MessageInstance
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.