public abstract class NullMessageStore extends Object implements MessageStore, DurableConfigurationStore, MessageStoreProvider, MessageStore.MessageStoreReader
MessageStore.MessageStoreReader| Constructor and Description |
|---|
NullMessageStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(EventListener eventListener,
Event... events) |
<T extends StorableMessageMetaData> |
addMessage(T metaData) |
void |
close() |
void |
closeConfigurationStore() |
void |
closeMessageStore()
Called to close and cleanup any resources used by the message store.
|
void |
create(ConfiguredObjectRecord record)
Makes the specified object persistent.
|
StoredMessage<?> |
getMessage(long messageId) |
MessageStore |
getMessageStore() |
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)
Deletes the configuration store from its underlying storage.
|
void |
openConfigurationStore(ConfiguredObject<?> parent,
boolean overwrite,
ConfiguredObjectRecord... initialRecords)
Initializes and opens the configuration store.
|
void |
openMessageStore(ConfiguredObject<?> parent)
Initializes and opens the message store.
|
UUID[] |
remove(ConfiguredObjectRecord... objects)
Removes the specified persistent configured objects.
|
void |
update(boolean createIfNecessary,
ConfiguredObjectRecord... records)
Updates the specified objects in the persistent store, IF it is already present.
|
void |
upgradeStoreStructure()
Requests that the store performs any upgrade work on the store's structure.
|
void |
visitConfiguredObjectRecords(ConfiguredObjectRecordHandler handler)
Visit all configured object records with given handler.
|
void |
visitDistributedTransactions(DistributedTransactionHandler handler) |
void |
visitMessageInstances(MessageInstanceHandler handler) |
void |
visitMessageInstances(TransactionLogResource queue,
MessageInstanceHandler handler) |
void |
visitMessages(MessageHandler handler) |
public MessageStore getMessageStore()
getMessageStore in interface MessageStoreProviderpublic void openConfigurationStore(ConfiguredObject<?> parent, boolean overwrite, ConfiguredObjectRecord... initialRecords)
DurableConfigurationStoreopenConfigurationStore in interface DurableConfigurationStorepublic void update(boolean createIfNecessary,
ConfiguredObjectRecord... records)
DurableConfigurationStoreupdate in interface DurableConfigurationStorecreateIfNecessary - if false then will fail if the object does not exist.records - the records to updatepublic UUID[] remove(ConfiguredObjectRecord... objects)
DurableConfigurationStoreremove in interface DurableConfigurationStoreobjects - The objects to remove.public void create(ConfiguredObjectRecord record)
DurableConfigurationStorecreate in interface DurableConfigurationStorerecord - The object to persist.public void openMessageStore(ConfiguredObject<?> parent)
MessageStoreopenMessageStore in interface MessageStoreparent - parent objectpublic void upgradeStoreStructure()
throws StoreException
MessageStoreupgradeStoreStructure in interface DurableConfigurationStoreupgradeStoreStructure in interface MessageStoreStoreException - 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 void closeMessageStore()
MessageStorecloseMessageStore in interface MessageStorepublic void closeConfigurationStore()
closeConfigurationStore in interface DurableConfigurationStorepublic <T extends StorableMessageMetaData> MessageHandle<T> addMessage(T metaData)
addMessage in interface MessageStorepublic boolean isPersistent()
MessageStoreisPersistent in interface MessageStorepublic Transaction newTransaction()
newTransaction in interface MessageStorepublic void addEventListener(EventListener eventListener, Event... events)
addEventListener in interface MessageStorepublic String getStoreLocation()
getStoreLocation in interface MessageStorepublic File getStoreLocationAsFile()
getStoreLocationAsFile in interface MessageStorepublic void onDelete(ConfiguredObject<?> parent)
DurableConfigurationStoreonDelete in interface DurableConfigurationStoreonDelete in interface MessageStorepublic void visitConfiguredObjectRecords(ConfiguredObjectRecordHandler handler) throws StoreException
DurableConfigurationStorevisitConfiguredObjectRecords in interface DurableConfigurationStorehandler - a handler to invoke on each configured object recordStoreExceptionpublic void visitMessages(MessageHandler handler) throws StoreException
visitMessages in interface MessageStore.MessageStoreReaderStoreExceptionpublic void visitMessageInstances(TransactionLogResource queue, MessageInstanceHandler handler) throws StoreException
visitMessageInstances in interface MessageStore.MessageStoreReaderStoreExceptionpublic void visitMessageInstances(MessageInstanceHandler handler) throws StoreException
visitMessageInstances in interface MessageStore.MessageStoreReaderStoreExceptionpublic void visitDistributedTransactions(DistributedTransactionHandler handler) throws StoreException
visitDistributedTransactions in interface MessageStore.MessageStoreReaderStoreExceptionpublic long getNextMessageId()
getNextMessageId in interface MessageStorepublic StoredMessage<?> getMessage(long messageId)
getMessage in interface MessageStore.MessageStoreReaderpublic MessageStore.MessageStoreReader newMessageStoreReader()
newMessageStoreReader in interface MessageStorepublic void close()
close in interface MessageStore.MessageStoreReaderCopyright © 2006–2016 The Apache Software Foundation. All rights reserved.