| java.lang.Object org.jgroups.protocols.SavedMessages
SavedMessages | class SavedMessages (Code) | | class SavedMessages
Stores a set of messages along with their sequence id (assigned by the sequencer).
|
Field Summary | |
final Log | log |
SavedMessages | SavedMessages()(Code) | | Constructor - creates an empty space to store messages
|
clearMessages | public void clearMessages()(Code) | | clears all of the stored messages
|
getFirstMessage | public synchronized Message getFirstMessage()(Code) | | returns the stored message with the lowest sequence id;
the message is then removed from the list of stored messages
if their are no messages stored, null is returned
|
getFirstSeq | public long getFirstSeq()(Code) | | returns the lowest sequence id of the messages stored
if no messages are stored, -1 is returned
|
getMessage | public Message getMessage(long seq)(Code) | | returns a stored message with the given sequence id
the message is then removed from the list of stored messages
if no message is stored with this sequence id, null is returned
|
getSize | public int getSize()(Code) | | returns the number of messages stored
|
insertMessage | public void insertMessage(Message msg, long seq)(Code) | | inserts the specified message and sequence id into the "list" of stored messages
if the sequence id given is already stored, then nothing is stored
|
isEmpty | public boolean isEmpty()(Code) | | returns true if there are messages stored
returns false if there are no messages stored
|
peekFirstMessage | public Message peekFirstMessage()(Code) | | similar to GetFirstMessage, except a copy of the message is returned
and the message is not removed from the list
|
peekMessage | public Message peekMessage(long seq)(Code) | | similar to GetMessage, except a copy of the message is returned
and the message is not removed from the list
|
|
|