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()
TODO JNR.
|
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 close()
close
in interface AutoCloseable
close
in interface Closeable
void createBackup(BackupConfig backupConfig) throws DirectoryException
backupConfig
- The configuration to use when performing the backup.DirectoryException
- If a Directory Server error occurs.void removeBackup(BackupDirectory backupDirectory, String backupID) throws DirectoryException
backupDirectory
- The backup directory structure with which the specified backup is
associated.backupID
- The backup ID for the backup to be removed.DirectoryException
- If it is not possible to remove the specified backup.void restoreBackup(RestoreConfig restoreConfig) throws DirectoryException
restoreConfig
- The configuration to use when performing the restore.DirectoryException
- If a Directory Server error occurs.Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.