public class MemoryMessageStore extends Object implements MessageStore
MessageStore.MessageStoreReader
Constructor and Description |
---|
MemoryMessageStore() |
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(EventListener eventListener,
Event... events) |
<T extends StorableMessageMetaData> |
addMessage(T metaData) |
void |
closeMessageStore()
Called to close and cleanup any resources used by the message store.
|
long |
getNextMessageId() |
String |
getStoreLocation() |
File |
getStoreLocationAsFile() |
boolean |
isPersistent()
Is this store capable of persisting the data
|
MessageStore.MessageStoreReader |
newMessageStoreReader() |
Transaction |
newTransaction() |
void |
onDelete(ConfiguredObject<?> parent) |
void |
openMessageStore(ConfiguredObject<?> parent)
Initializes and opens the message store.
|
void |
upgradeStoreStructure()
Requests that the store performs any upgrade work on the store's structure.
|
public static final String TYPE
public void openMessageStore(ConfiguredObject<?> parent)
MessageStore
openMessageStore
in interface MessageStore
parent
- parent objectpublic void upgradeStoreStructure() throws StoreException
MessageStore
upgradeStoreStructure
in interface MessageStore
StoreException
- signals that a problem was encountered trying to upgrade the store.
Implementations, on encountering a problem, should endeavour to leave the store in its
original state.public <T extends StorableMessageMetaData> MessageHandle<T> addMessage(T metaData)
addMessage
in interface MessageStore
public long getNextMessageId()
getNextMessageId
in interface MessageStore
public boolean isPersistent()
MessageStore
isPersistent
in interface MessageStore
public Transaction newTransaction()
newTransaction
in interface MessageStore
public void closeMessageStore()
MessageStore
closeMessageStore
in interface MessageStore
public void addEventListener(EventListener eventListener, Event... events)
addEventListener
in interface MessageStore
public String getStoreLocation()
getStoreLocation
in interface MessageStore
public File getStoreLocationAsFile()
getStoreLocationAsFile
in interface MessageStore
public void onDelete(ConfiguredObject<?> parent)
onDelete
in interface MessageStore
public MessageStore.MessageStoreReader newMessageStoreReader()
newMessageStoreReader
in interface MessageStore
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.