Interface Storage
- All Superinterfaces:
AutoCloseable,Backupable,Closeable
- All Known Implementing Classes:
JEStorage
This interface abstracts the underlying storage engine, isolating the pluggable backend generic code from a
particular storage engine implementation.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Returns the current status of the storage.Lists the trees that exist in this storage.voidopen(AccessMode accessMode) Opens the storage engine to allow executing operations on it.<T> Tread(ReadOperation<T> readOperation) Executes a read operation.voidRemove all files for a backend of this storage.Starts the import operation.voidwrite(WriteOperation writeOperation) Executes a write operation.voidwrite(WriteOperation writeOperation, WriteableTransaction.WriteTransactionOption option) Executes a write operation.Methods inherited from interface org.opends.server.backup.Backupable
afterBackup, afterRestore, beforeBackup, beforeRestore, getBackendFiles, getBackendID, getDirectory
-
Method Details
-
startImport
Starts the import operation.- Returns:
- a new Importer object which must be closed to release all resources
- Throws:
ConfigException- if there is a problem with the configurationStorageRuntimeException- if a problem occurs with the underlying storage engine- See Also:
-
open
Opens the storage engine to allow executing operations on it.- Parameters:
accessMode- Specify the access mode to this storage.- Throws:
NullPointerException- if accessMode is null.Exception- if a problem occurs with the underlying storage engine- See Also:
-
read
Executes a read operation. In case of a read operation rollback, implementations must ensure the read operation is retried until it succeeds.- Type Parameters:
T- type of the value returned- Parameters:
readOperation- the read operation to execute- Returns:
- the value read by the read operation
- Throws:
Exception- if a problem occurs with the underlying storage engine
-
write
Executes a write operation. In case of a write operation rollback, implementations must ensure the write operation is retried until it succeeds.- Parameters:
writeOperation- the write operation to execute- Throws:
Exception- if a problem occurs with the underlying storage engine
-
write
void write(WriteOperation writeOperation, WriteableTransaction.WriteTransactionOption option) throws Exception Executes a write operation. In case of a write operation rollback, implementations must ensure the write operation is retried until it succeeds.- Parameters:
writeOperation- the write operation to executeoption- the option to apply to this transaction- Throws:
Exception- if a problem occurs with the underlying storage engine
-
removeStorageFiles
Remove all files for a backend of this storage.- Throws:
StorageRuntimeException- if removal fails
-
getStorageStatus
StorageStatus getStorageStatus()Returns the current status of the storage.- Returns:
- the current status of the storage
-
listTrees
Lists the trees that exist in this storage.- Returns:
- a set of
TreeNames representing the trees that exist in this storage
-
close
void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-