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 MessageStoreProvider
public void openConfigurationStore(ConfiguredObject<?> parent, boolean overwrite, ConfiguredObjectRecord... initialRecords)
DurableConfigurationStore
openConfigurationStore
in interface DurableConfigurationStore
public void update(boolean createIfNecessary, ConfiguredObjectRecord... records)
DurableConfigurationStore
update
in interface DurableConfigurationStore
createIfNecessary
- if false then will fail if the object does not exist.records
- the records to updatepublic UUID[] remove(ConfiguredObjectRecord... objects)
DurableConfigurationStore
remove
in interface DurableConfigurationStore
objects
- The objects to remove.public void create(ConfiguredObjectRecord record)
DurableConfigurationStore
create
in interface DurableConfigurationStore
record
- The object to persist.public void openMessageStore(ConfiguredObject<?> parent)
MessageStore
openMessageStore
in interface MessageStore
parent
- parent objectpublic void upgradeStoreStructure() throws StoreException
MessageStore
upgradeStoreStructure
in interface DurableConfigurationStore
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 void closeMessageStore()
MessageStore
closeMessageStore
in interface MessageStore
public void closeConfigurationStore()
closeConfigurationStore
in interface DurableConfigurationStore
public <T extends StorableMessageMetaData> MessageHandle<T> addMessage(T metaData)
addMessage
in interface MessageStore
public boolean isPersistent()
MessageStore
isPersistent
in interface MessageStore
public Transaction newTransaction()
newTransaction
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)
DurableConfigurationStore
onDelete
in interface DurableConfigurationStore
onDelete
in interface MessageStore
public void visitConfiguredObjectRecords(ConfiguredObjectRecordHandler handler) throws StoreException
DurableConfigurationStore
visitConfiguredObjectRecords
in interface DurableConfigurationStore
handler
- a handler to invoke on each configured object recordStoreException
public void visitMessages(MessageHandler handler) throws StoreException
visitMessages
in interface MessageStore.MessageStoreReader
StoreException
public void visitMessageInstances(TransactionLogResource queue, MessageInstanceHandler handler) throws StoreException
visitMessageInstances
in interface MessageStore.MessageStoreReader
StoreException
public void visitMessageInstances(MessageInstanceHandler handler) throws StoreException
visitMessageInstances
in interface MessageStore.MessageStoreReader
StoreException
public void visitDistributedTransactions(DistributedTransactionHandler handler) throws StoreException
visitDistributedTransactions
in interface MessageStore.MessageStoreReader
StoreException
public long getNextMessageId()
getNextMessageId
in interface MessageStore
public StoredMessage<?> getMessage(long messageId)
getMessage
in interface MessageStore.MessageStoreReader
public MessageStore.MessageStoreReader newMessageStoreReader()
newMessageStoreReader
in interface MessageStore
public void close()
close
in interface MessageStore.MessageStoreReader
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.