public class BDBConfigurationStore extends Object implements MessageStoreProvider, DurableConfigurationStore
| Modifier and Type | Field and Description |
|---|---|
static int |
VERSION |
| Constructor and Description |
|---|
BDBConfigurationStore(Class<? extends ConfiguredObject> rootClass) |
BDBConfigurationStore(EnvironmentFacadeFactory environmentFacadeFactory,
Class<? extends ConfiguredObject> rootClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeConfigurationStore() |
void |
create(ConfiguredObjectRecord configuredObject)
Makes the specified object persistent.
|
EnvironmentFacade |
getEnvironmentFacade() |
MessageStore |
getMessageStore() |
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.
|
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.
|
public static final int VERSION
public BDBConfigurationStore(Class<? extends ConfiguredObject> rootClass)
public BDBConfigurationStore(EnvironmentFacadeFactory environmentFacadeFactory, Class<? extends ConfiguredObject> rootClass)
public void openConfigurationStore(ConfiguredObject<?> parent, boolean overwrite, ConfiguredObjectRecord... initialRecords)
DurableConfigurationStoreopenConfigurationStore in interface DurableConfigurationStorepublic void upgradeStoreStructure()
throws StoreException
DurableConfigurationStoreupgradeStoreStructure in interface DurableConfigurationStoreStoreException - 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 visitConfiguredObjectRecords(ConfiguredObjectRecordHandler handler)
DurableConfigurationStorevisitConfiguredObjectRecords in interface DurableConfigurationStorehandler - a handler to invoke on each configured object recordpublic EnvironmentFacade getEnvironmentFacade()
public void closeConfigurationStore()
throws StoreException
closeConfigurationStore in interface DurableConfigurationStoreStoreExceptionpublic void create(ConfiguredObjectRecord configuredObject) throws StoreException
DurableConfigurationStorecreate in interface DurableConfigurationStoreconfiguredObject - The object to persist.StoreException - If the operation fails for any reason.public UUID[] remove(ConfiguredObjectRecord... objects) throws StoreException
DurableConfigurationStoreremove in interface DurableConfigurationStoreobjects - The objects to remove.StoreException - If the operation fails for any reason.public void update(boolean createIfNecessary,
ConfiguredObjectRecord... records)
throws StoreException
DurableConfigurationStoreupdate in interface DurableConfigurationStorecreateIfNecessary - if false then will fail if the object does not exist.records - the records to updateStoreException - If the operation fails for any reason.public MessageStore getMessageStore()
getMessageStore in interface MessageStoreProviderpublic void onDelete(ConfiguredObject<?> parent)
DurableConfigurationStoreonDelete in interface DurableConfigurationStoreCopyright © 2006–2016 The Apache Software Foundation. All rights reserved.