public class PrioritizedPendingList extends Object implements PendingList
| Constructor and Description |
|---|
PrioritizedPendingList() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAll(PendingList pendingList)
Adds all the elements of the given PendingList to this PendingList.
|
PendingNode |
addMessageFirst(MessageReference message)
Adds the given message to the head of the list.
|
PendingNode |
addMessageLast(MessageReference message)
Adds the given message to the tail of the list.
|
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) |
protected OrderedPendingList |
getList(MessageReference msg) |
protected int |
getPriority(MessageReference message) |
boolean |
isEmpty()
Returns true if there are no Messages in the PendingList currently.
|
Iterator<MessageReference> |
iterator()
Returns an iterator over the pending Messages.
|
PendingNode |
remove(MessageReference message)
Removes the given MessageReference from the PendingList if it is
contained within.
|
int |
size()
Returns the number of MessageReferences that are awaiting dispatch.
|
String |
toString() |
Collection<MessageReference> |
values()
Returns a new Collection that contains all the MessageReferences currently
held in this PendingList.
|
public PrioritizedPendingList()
public PendingNode addMessageFirst(MessageReference message)
PendingListaddMessageFirst in interface PendingListmessage - The MessageReference that is to be added to this list.public PendingNode addMessageLast(MessageReference message)
PendingListaddMessageLast in interface PendingListmessage - The MessageReference that is to be added to this list.public void clear()
PendingListclear in interface PendingListpublic boolean isEmpty()
PendingListisEmpty in interface PendingListpublic Iterator<MessageReference> iterator()
PendingListiterator in interface Iterable<MessageReference>iterator in interface PendingListpublic PendingNode remove(MessageReference message)
PendingListremove in interface PendingListmessage - The MessageReference that is to be removed to this list.public int size()
PendingListsize in interface PendingListprotected int getPriority(MessageReference message)
protected OrderedPendingList getList(MessageReference msg)
public boolean contains(MessageReference message)
PendingListcontains in interface PendingListmessage - The Message that is the target of this query.public Collection<MessageReference> values()
PendingListvalues in interface PendingListpublic void addAll(PendingList pendingList)
PendingListaddAll in interface PendingListpendingList - The PendingList that is to be added to this collection.public MessageReference get(MessageId messageId)
get in interface PendingListCopyright © 2005–2021 FuseSource, Corp.. All rights reserved.