public class InMemoryStore extends AbstractMessageStore
description, fileName, lock, messageStoreMBean, messageStoreObservers, name, parameterKeyMap, parameters, sequence, synapseConfiguration, synapseEnvironment
Constructor and Description |
---|
InMemoryStore() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Delete all the Messages in the Message Store
|
void |
destroy()
This method should implement the destroying of the
implemented parts of the configuration.
|
MessageContext |
get(int index)
Return the Message in given index position
(this may depend on the implementation)
|
MessageContext |
get(java.lang.String messageId)
Get the Message with the given ID from the Message store without removing it
|
java.util.List<MessageContext> |
getAll()
Get the All messages in the Message store without removing them from the queue
|
MessageConsumer |
getConsumer()
Returns a Message Consumer for this message store.
|
MessageProducer |
getProducer()
Returns a Message Producer for this message store.
|
java.lang.Object |
getQLock() |
int |
getType()
Returns the type of this message store.
|
void |
init(SynapseEnvironment se)
This method should implement the initialization of the
implemented parts of the configuration.
|
MessageContext |
remove()
Retrieves and removes the first Message in this store.
|
MessageContext |
remove(java.lang.String messageID)
Delete and return the MessageContext with given Message id
|
int |
size()
Returns the number of Messages in this store.
|
addParameter, addParameterKey, dequeued, difference, enqueued, getArtifactContainerName, getDescription, getFileName, getLock, getName, getParameterKey, getParameterKeyMap, getParameters, isEdited, nextConsumerId, nextProducerId, notifyMessageAddition, notifyMessageRemoval, registerObserver, setArtifactContainerName, setDescription, setFileName, setIsEdited, setName, setParameters, unregisterObserver
public MessageProducer getProducer()
MessageStore
public MessageConsumer getConsumer()
MessageStore
public int getType()
MessageStore
Constants.JMS_MS
, Constants.INMEMORY_MS
,
or Constants.JDBC_MS
getType
in interface MessageStore
getType
in class AbstractMessageStore
public int size()
MessageStore
size
in interface MessageStore
size
in class AbstractMessageStore
public MessageContext remove() throws java.util.NoSuchElementException
MessageStore
java.util.NoSuchElementException
- if store is emptypublic void clear()
MessageStore
public MessageContext remove(java.lang.String messageID)
MessageStore
messageID
- message id of the Messagepublic MessageContext get(int index)
MessageStore
index
- position of the messagepublic java.util.List<MessageContext> getAll()
MessageStore
public MessageContext get(java.lang.String messageId)
MessageStore
messageId
- A message ID stringpublic void init(SynapseEnvironment se)
ManagedLifecycle
init
in interface ManagedLifecycle
init
in class AbstractMessageStore
se
- SynapseEnvironment to be used for initializationpublic void destroy()
ManagedLifecycle
destroy
in interface ManagedLifecycle
destroy
in class AbstractMessageStore
public java.lang.Object getQLock()
Copyright © 2005-2020 Apache Software Foundation. All Rights Reserved.