org.apache.qpid.server.queue
Class QueueEntryImpl

java.lang.Object
  extended by org.apache.qpid.server.queue.QueueEntryImpl
All Implemented Interfaces:
Comparable<QueueEntry>, Filterable, QueueEntry

public class QueueEntryImpl
extends Object
implements QueueEntry


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.qpid.server.queue.QueueEntry
QueueEntry.AvailableState, QueueEntry.DeletedState, QueueEntry.DequeuedState, QueueEntry.EntryState, QueueEntry.ExpiredState, QueueEntry.NonSubscriptionAcquiredState, QueueEntry.State, QueueEntry.StateChangeListener, QueueEntry.SubscriptionAcquiredState, QueueEntry.SubscriptionAssignedState
 
Field Summary
(package private)  QueueEntryImpl _next
           
 
Fields inherited from interface org.apache.qpid.server.queue.QueueEntry
AVAILABLE_STATE, DELETED_STATE, DEQUEUED_STATE, EXPIRED_STATE, NON_SUBSCRIPTION_ACQUIRED_STATE
 
Constructor Summary
QueueEntryImpl(SimpleQueueEntryList queueEntryList)
           
QueueEntryImpl(SimpleQueueEntryList queueEntryList, ServerMessage message)
           
QueueEntryImpl(SimpleQueueEntryList queueEntryList, ServerMessage message, long entryId)
           
 
Method Summary
 boolean acquire()
           
 boolean acquire(Subscription sub)
           
 boolean acquiredBySubscription()
           
 void addStateChangeListener(QueueEntry.StateChangeListener listener)
           
 int compareTo(QueueEntry o)
           
 boolean delete()
           
 void dequeue()
           
 void discard()
           
 void dispose()
           
 boolean expired()
           
 Subscription getDeliveredSubscription()
           
 boolean getDeliveredToConsumer()
           
protected  long getEntryId()
           
 ServerMessage getMessage()
           
 AMQMessageHeader getMessageHeader()
           
 QueueEntryImpl getNext()
           
 AMQQueue getQueue()
           
 QueueEntryList getQueueEntryList()
           
 long getSize()
           
 boolean immediateAndNotDelivered()
           
 boolean isAcquired()
           
 boolean isAcquiredBy(Subscription subscription)
           
 boolean isAvailable()
           
 boolean isDeleted()
           
 boolean isPersistent()
           
 boolean isQueueDeleted()
           
 boolean isRedelivered()
           
 boolean isRejectedBy(Subscription subscription)
           
(package private)  QueueEntryImpl nextNode()
           
 void reject()
           
 void reject(Subscription subscription)
           
 void release()
           
 boolean releaseButRetain()
           
 boolean removeStateChangeListener(QueueEntry.StateChangeListener listener)
           
 void requeue(Subscription subscription)
           
 void routeToAlternate()
           
protected  void setEntryId(long entryId)
           
 void setRedelivered()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_next

volatile QueueEntryImpl _next
Constructor Detail

QueueEntryImpl

QueueEntryImpl(SimpleQueueEntryList queueEntryList)

QueueEntryImpl

public QueueEntryImpl(SimpleQueueEntryList queueEntryList,
                      ServerMessage message,
                      long entryId)

QueueEntryImpl

public QueueEntryImpl(SimpleQueueEntryList queueEntryList,
                      ServerMessage message)
Method Detail

setEntryId

protected void setEntryId(long entryId)

getEntryId

protected long getEntryId()

getQueue

public AMQQueue getQueue()
Specified by:
getQueue in interface QueueEntry

getMessage

public ServerMessage getMessage()
Specified by:
getMessage in interface QueueEntry

getSize

public long getSize()
Specified by:
getSize in interface QueueEntry

getDeliveredToConsumer

public boolean getDeliveredToConsumer()
Specified by:
getDeliveredToConsumer in interface QueueEntry

expired

public boolean expired()
                throws org.apache.qpid.AMQException
Specified by:
expired in interface QueueEntry
Throws:
org.apache.qpid.AMQException

isAvailable

public boolean isAvailable()
Specified by:
isAvailable in interface QueueEntry

isAcquired

public boolean isAcquired()
Specified by:
isAcquired in interface QueueEntry

acquire

public boolean acquire()
Specified by:
acquire in interface QueueEntry

acquire

public boolean acquire(Subscription sub)
Specified by:
acquire in interface QueueEntry

acquiredBySubscription

public boolean acquiredBySubscription()
Specified by:
acquiredBySubscription in interface QueueEntry

isAcquiredBy

public boolean isAcquiredBy(Subscription subscription)
Specified by:
isAcquiredBy in interface QueueEntry

release

public void release()
Specified by:
release in interface QueueEntry

releaseButRetain

public boolean releaseButRetain()
Specified by:
releaseButRetain in interface QueueEntry

immediateAndNotDelivered

public boolean immediateAndNotDelivered()
Specified by:
immediateAndNotDelivered in interface QueueEntry

setRedelivered

public void setRedelivered()
Specified by:
setRedelivered in interface QueueEntry

getMessageHeader

public AMQMessageHeader getMessageHeader()
Specified by:
getMessageHeader in interface Filterable

isPersistent

public boolean isPersistent()
Specified by:
isPersistent in interface Filterable

isRedelivered

public boolean isRedelivered()
Specified by:
isRedelivered in interface Filterable
Specified by:
isRedelivered in interface QueueEntry

getDeliveredSubscription

public Subscription getDeliveredSubscription()
Specified by:
getDeliveredSubscription in interface QueueEntry

reject

public void reject()
Specified by:
reject in interface QueueEntry

reject

public void reject(Subscription subscription)
Specified by:
reject in interface QueueEntry

isRejectedBy

public boolean isRejectedBy(Subscription subscription)
Specified by:
isRejectedBy in interface QueueEntry

requeue

public void requeue(Subscription subscription)
Specified by:
requeue in interface QueueEntry

dequeue

public void dequeue()
Specified by:
dequeue in interface QueueEntry

dispose

public void dispose()
Specified by:
dispose in interface QueueEntry

discard

public void discard()
Specified by:
discard in interface QueueEntry

routeToAlternate

public void routeToAlternate()
Specified by:
routeToAlternate in interface QueueEntry

isQueueDeleted

public boolean isQueueDeleted()
Specified by:
isQueueDeleted in interface QueueEntry

addStateChangeListener

public void addStateChangeListener(QueueEntry.StateChangeListener listener)
Specified by:
addStateChangeListener in interface QueueEntry

removeStateChangeListener

public boolean removeStateChangeListener(QueueEntry.StateChangeListener listener)
Specified by:
removeStateChangeListener in interface QueueEntry

compareTo

public int compareTo(QueueEntry o)
Specified by:
compareTo in interface Comparable<QueueEntry>

getNext

public QueueEntryImpl getNext()

nextNode

QueueEntryImpl nextNode()

isDeleted

public boolean isDeleted()
Specified by:
isDeleted in interface QueueEntry

delete

public boolean delete()
Specified by:
delete in interface QueueEntry

getQueueEntryList

public QueueEntryList getQueueEntryList()


Licensed to the Apache Software Foundation