public class QueueDispatchPendingList extends Object implements PendingList
Constructor and Description |
---|
QueueDispatchPendingList() |
Modifier and Type | Method and Description |
---|---|
void |
addAll(PendingList pendingList)
Adds all the elements of the given PendingList to this PendingList.
|
void |
addForRedelivery(List<MessageReference> list,
boolean noConsumers) |
PendingNode |
addMessageFirst(MessageReference message)
Messages added are added directly to the pagedInPendingDispatch set of messages.
|
PendingNode |
addMessageLast(MessageReference message)
Messages added are added directly to the pagedInPendingDispatch set of messages.
|
void |
clear()
Discards all Messages currently held in the PendingList.
|
boolean |
contains(MessageReference message)
Query the PendingList to determine if the given message is contained within.
|
MessageReference |
get(MessageId messageId) |
boolean |
hasRedeliveries() |
boolean |
isEmpty()
Returns true if there are no Messages in the PendingList currently.
|
Iterator<MessageReference> |
iterator()
Returns an iterator over the pending Messages.
|
long |
messageSize() |
PendingNode |
remove(MessageReference message)
Removes the given MessageReference from the PendingList if it is
contained within.
|
void |
setPrioritizedMessages(boolean prioritizedMessages) |
int |
size()
Returns the number of MessageReferences that are awaiting dispatch.
|
Collection<MessageReference> |
values()
Returns a new Collection that contains all the MessageReferences currently
held in this PendingList.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public QueueDispatchPendingList()
public boolean isEmpty()
PendingList
isEmpty
in interface PendingList
public void clear()
PendingList
clear
in interface PendingList
public PendingNode addMessageFirst(MessageReference message)
addMessageFirst
in interface PendingList
message
- The MessageReference that is to be added to this list.public PendingNode addMessageLast(MessageReference message)
addMessageLast
in interface PendingList
message
- The MessageReference that is to be added to this list.public PendingNode remove(MessageReference message)
PendingList
remove
in interface PendingList
message
- The MessageReference that is to be removed to this list.public int size()
PendingList
size
in interface PendingList
public long messageSize()
messageSize
in interface PendingList
public Iterator<MessageReference> iterator()
PendingList
iterator
in interface Iterable<MessageReference>
iterator
in interface PendingList
public boolean contains(MessageReference message)
PendingList
contains
in interface PendingList
message
- The Message that is the target of this query.public Collection<MessageReference> values()
PendingList
values
in interface PendingList
public void addAll(PendingList pendingList)
PendingList
addAll
in interface PendingList
pendingList
- The PendingList that is to be added to this collection.public MessageReference get(MessageId messageId)
get
in interface PendingList
public void setPrioritizedMessages(boolean prioritizedMessages)
public boolean hasRedeliveries()
public void addForRedelivery(List<MessageReference> list, boolean noConsumers)
Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.