public class InMemoryMessageStore extends AbstractMessageStore
description, fileName, messageStoreMBean, messageStoreObservers, name, parameters, sequence, synapseConfiguration, synapseEnvironment| Constructor and Description |
|---|
InMemoryMessageStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Delete all the Messages in the Message Store
|
MessageContext |
get(int index)
Return the Message in given index position
(this may depend on the implementation)
|
MessageContext |
get(String messageId)
Get the Message with the given ID from the Message store without removing it
|
List<MessageContext> |
getAll()
Get the All messages in the Message store without removing them from the queue
|
boolean |
offer(MessageContext messageContext)
Inserts the Message into this store if it is possible to do so immediately
without violating capacity restrictions.
|
MessageContext |
peek()
Retrieves but not removes the first Message in this store.
|
MessageContext |
poll()
Retrieves and removes the first Message in this store.
|
MessageContext |
remove()
Retrieves and removes the first Message in this store.
|
MessageContext |
remove(String messageID)
Delete and return the MessageContext with given Message id
|
int |
size()
Returns the number of Messages in this store.
|
destroy, getDescription, getFileName, getLock, getName, getParameters, init, notifyMessageAddition, notifyMessageRemoval, registerObserver, setDescription, setFileName, setName, setParameters, unregisterObserverpublic boolean offer(MessageContext messageContext)
MessageStoremessageContext - MessageContext to be savedpublic MessageContext poll()
MessageStorepublic MessageContext peek()
MessageStorepublic MessageContext remove() throws NoSuchElementException
MessageStoreNoSuchElementException - if store is emptypublic MessageContext get(int index)
MessageStoreindex - position of the messagepublic MessageContext remove(String messageID)
MessageStoremessageID - message id of the Messagepublic void clear()
MessageStorepublic List<MessageContext> getAll()
MessageStorepublic MessageContext get(String messageId)
MessageStoremessageId - A message ID stringpublic int size()
MessageStoresize in interface MessageStoresize in class AbstractMessageStoreCopyright © 2005-2017 Apache Software Foundation. All Rights Reserved.