public interface Storage extends Closeable
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
createBackup(BackupConfig backupConfig)
Creates a backup for this storage.
|
StorageStatus |
getStorageStatus()
Returns the current status of the storage.
|
Set<TreeName> |
listTrees()
Lists the trees that exist in this storage.
|
void |
open(AccessMode accessMode)
Opens the storage engine to allow executing operations on it.
|
<T> T |
read(ReadOperation<T> readOperation)
Executes a read operation.
|
void |
removeBackup(BackupDirectory backupDirectory,
String backupID)
Removes a backup for this storage.
|
void |
removeStorageFiles()
Remove all files for a backend of this storage.
|
void |
restoreBackup(RestoreConfig restoreConfig)
Restores a backup for this storage.
|
Importer |
startImport()
Starts the import operation.
|
boolean |
supportsBackupAndRestore()
Returns
true if this storage supports backup and restore. |
void |
write(WriteOperation writeOperation)
Executes a write operation.
|
Importer startImport() throws ConfigException, StorageRuntimeException
ConfigException
- if there is a problem with the configurationStorageRuntimeException
- if a problem occurs with the underlying storage engineto release all resources once import is finished
void open(AccessMode accessMode) throws Exception
accessMode
- Specify the access mode to this storage.NullPointerException
- if accessMode is null.Exception
- if a problem occurs with the underlying storage engineto release all resources once import is finished
<T> T read(ReadOperation<T> readOperation) throws Exception
T
- type of the value returnedreadOperation
- the read operation to executeException
- if a problem occurs with the underlying storage enginevoid write(WriteOperation writeOperation) throws Exception
writeOperation
- the write operation to executeException
- if a problem occurs with the underlying storage enginevoid removeStorageFiles() throws StorageRuntimeException
StorageRuntimeException
- if removal failsStorageStatus getStorageStatus()
boolean supportsBackupAndRestore()
true
if this storage supports backup and restore.true
if this storage supports backup and restore.void createBackup(BackupConfig backupConfig) throws LdapException
backupConfig
- The configuration to use when performing the backup.LdapException
- If a Directory Server error occurs.void removeBackup(BackupDirectory backupDirectory, String backupID) throws LdapException
backupDirectory
- The backup directory structure with which the specified backup is associated.backupID
- The backup ID for the backup to be removed.LdapException
- If it is not possible to remove the specified backup.void restoreBackup(RestoreConfig restoreConfig) throws LdapException
restoreConfig
- The configuration to use when performing the restore.LdapException
- If a Directory Server error occurs.Set<TreeName> listTrees()
TreeName
s representing the trees that exist in this storagevoid close()
close
in interface AutoCloseable
close
in interface Closeable
Copyright 2010-2022 ForgeRock AS.