public class ManagementModeStoreHandler extends Object implements DurableConfigurationStore
Constructor and Description |
---|
ManagementModeStoreHandler(DurableConfigurationStore store,
SystemConfig<?> systemConfig) |
Modifier and Type | Method and Description |
---|---|
void |
closeConfigurationStore() |
void |
create(ConfiguredObjectRecord object)
Makes the specified object persistent.
|
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... records)
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 recoveryHandler)
Visit all configured object records with given handler.
|
public ManagementModeStoreHandler(DurableConfigurationStore store, SystemConfig<?> systemConfig)
public void openConfigurationStore(ConfiguredObject<?> parent, boolean overwrite, ConfiguredObjectRecord... initialRecords) throws StoreException
DurableConfigurationStore
openConfigurationStore
in interface DurableConfigurationStore
StoreException
public void upgradeStoreStructure() throws StoreException
DurableConfigurationStore
upgradeStoreStructure
in interface DurableConfigurationStore
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 visitConfiguredObjectRecords(ConfiguredObjectRecordHandler recoveryHandler) throws StoreException
DurableConfigurationStore
visitConfiguredObjectRecords
in interface DurableConfigurationStore
recoveryHandler
- a handler to invoke on each configured object recordStoreException
public void create(ConfiguredObjectRecord object)
DurableConfigurationStore
create
in interface DurableConfigurationStore
object
- The object to persist.public void update(boolean createIfNecessary, ConfiguredObjectRecord... records) throws StoreException
DurableConfigurationStore
update
in interface DurableConfigurationStore
createIfNecessary
- if false then will fail if the object does not exist.records
- the records to updateStoreException
- If the operation fails for any reason.public void closeConfigurationStore() throws StoreException
closeConfigurationStore
in interface DurableConfigurationStore
StoreException
public void onDelete(ConfiguredObject<?> parent)
DurableConfigurationStore
onDelete
in interface DurableConfigurationStore
public UUID[] remove(ConfiguredObjectRecord... records)
DurableConfigurationStore
remove
in interface DurableConfigurationStore
records
- The objects to remove.Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.