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, unregisterObserver
public boolean offer(MessageContext messageContext)
MessageStore
messageContext
- MessageContext to be savedpublic MessageContext poll()
MessageStore
public MessageContext peek()
MessageStore
public MessageContext remove() throws NoSuchElementException
MessageStore
NoSuchElementException
- if store is emptypublic MessageContext get(int index)
MessageStore
index
- position of the messagepublic MessageContext remove(String messageID)
MessageStore
messageID
- message id of the Messagepublic void clear()
MessageStore
public List<MessageContext> getAll()
MessageStore
public MessageContext get(String messageId)
MessageStore
messageId
- A message ID stringpublic int size()
MessageStore
size
in interface MessageStore
size
in class AbstractMessageStore
Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.