Package org.apache.qpid.server.store
Interface DurableConfigurationStore
-
- All Known Implementing Classes:
AbstractMemoryStore
,JsonFileConfigStore
,ManagementModeStoreHandler
,NullMessageStore
public interface DurableConfigurationStore
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
closeConfigurationStore()
void
create(ConfiguredObjectRecord object)
Makes the specified object persistent.void
init(ConfiguredObject<?> parent)
Initializes and opens the configuration store.void
onDelete(ConfiguredObject<?> parent)
Deletes the configuration store from its underlying storage.boolean
openConfigurationStore(ConfiguredObjectRecordHandler handler, ConfiguredObjectRecord... initialRecords)
Visit all configured object records with given handler.void
reload(ConfiguredObjectRecordHandler handler)
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.
-
-
-
Method Detail
-
init
void init(ConfiguredObject<?> parent) throws StoreException
Initializes and opens the configuration store.- Parameters:
parent
-- Throws:
StoreException
-
upgradeStoreStructure
void upgradeStoreStructure() throws StoreException
Requests that the store performs any upgrade work on the store's structure. If there is no upgrade work to be done, this method should return without doing anything.- Throws:
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.
-
openConfigurationStore
boolean openConfigurationStore(ConfiguredObjectRecordHandler handler, ConfiguredObjectRecord... initialRecords) throws StoreException
Visit all configured object records with given handler.- Parameters:
handler
- a handler to invoke on each configured object recordinitialRecords
-- Throws:
StoreException
-
reload
void reload(ConfiguredObjectRecordHandler handler) throws StoreException
- Throws:
StoreException
-
create
void create(ConfiguredObjectRecord object) throws StoreException
Makes the specified object persistent.- Parameters:
object
- The object to persist.- Throws:
StoreException
- If the operation fails for any reason.
-
update
void update(boolean createIfNecessary, ConfiguredObjectRecord... records) throws StoreException
Updates the specified objects in the persistent store, IF it is already present. If the object is not present in the store, it will only be added if createIfNecessary is set to true, otherwise an exception will be thrown.- Parameters:
createIfNecessary
- if false then will fail if the object does not exist.records
- the records to update- Throws:
StoreException
- If the operation fails for any reason.
-
remove
UUID[] remove(ConfiguredObjectRecord... objects) throws StoreException
Removes the specified persistent configured objects.- Parameters:
objects
- The objects to remove.- Throws:
StoreException
- If the operation fails for any reason.
-
closeConfigurationStore
void closeConfigurationStore() throws StoreException
- Throws:
StoreException
-
onDelete
void onDelete(ConfiguredObject<?> parent)
Deletes the configuration store from its underlying storage. If the store has not be opened, then this call will be ignored. The store should be closed before making this call.
-
-