public interface PersistenceObjectStore
Modifier and Type | Interface and Description |
---|---|
static interface |
PersistenceObjectStore.StoreObjectAccessor
accessor to an object/item in a
PersistenceObjectStore |
static interface |
PersistenceObjectStore.StoreObjectAccessorWithLock |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes all resources used by this ObjectStore.
|
void |
createSubPath(java.lang.String subPath)
create the directory at the given subPath relative to the base of this store
|
void |
deleteCompletely()
Entirely delete the contents of this persistence location.
|
java.lang.String |
getSummaryName()
human-readable name of this object store
|
void |
injectManagementContext(ManagementContext managementContext)
Allows a way for an object store to be created ahead of time, and a mgmt context injected.
|
java.util.List<java.lang.String> |
listContentsWithSubPath(java.lang.String subPath)
Lists the paths of objects contained at the given path, including the subpath.
|
PersistenceObjectStore.StoreObjectAccessor |
newAccessor(java.lang.String path)
For reading/writing data to the item at the given path.
|
void |
prepareForMasterUse()
Prepares the persistence store for "contentious writes".
|
void |
prepareForSharedUse(PersistMode persistMode,
HighAvailabilityMode highAvailabilityMode)
Prepares the persistence store for read use and non-contentious write use,
in particular detecting whether we should clean or register a need for backup etc.
|
java.lang.String getSummaryName()
@Beta void injectManagementContext(ManagementContext managementContext)
A ManagementContext
must be supplied via constructor or this method before invoking other methods.
@Beta void prepareForSharedUse(PersistMode persistMode, HighAvailabilityMode highAvailabilityMode)
injectManagementContext(ManagementContext)
,
but before prepareForMasterUse()
.
See prepareForMasterUse()
for discussion of "contentious writes".
@Beta void prepareForMasterUse()
Caller must call prepareForSharedUse(PersistMode, HighAvailabilityMode)
first
(and injectManagementContext(ManagementContext)
before that).
This is typically invoked "at the last moment" e.g. before the any such write, mainly in order to prevent backups being made unnecessarily (e.g. if a node is standby, or if it tries to become master but is not capable), but also to prevent simultaneous backups which can cause problems with some stores (only a mgmt who knows he is the master should invoke this).
@Beta PersistenceObjectStore.StoreObjectAccessor newAccessor(java.lang.String path)
Clients should wrap in a dedicated StoreObjectAccessorLocking
and share
if multiple threads may be accessing the store.
This method may be changed in future to allow access to a shared locking accessor.
void createSubPath(java.lang.String subPath)
java.util.List<java.lang.String> listContentsWithSubPath(java.lang.String subPath)
newAccessor(String)
.void deleteCompletely()
void close()