Package org.forgerock.opendj.server.core
Interface ArchivableDataProvider
-
public interface ArchivableDataProviderA data provider which supports backup and restore functionality.TODO: do we need supportsRestore?
TODO: do we need removeBackup?
TODO: is there any boiler plate code that abstracted in order to make implementation simpler? E.g. initialization, crypto.
FIXME: the async APIs used below are a bad fit. We do not want to return an
LdapException. We really need a more generic promises API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.forgerock.opendj.ldap.LdapPromise<Void>createBackup(BackupConfig backupConfig, org.forgerock.opendj.ldap.LdapResultHandler<Void> handler)Creates a backup of the contents of this data provider in a form that may be restored at a later date if necessary.DataProviderIDgetDataProviderID()Returns the ID of this data provider.org.forgerock.opendj.ldap.LdapPromise<Void>restoreBackup(RestoreConfig restoreConfig, org.forgerock.opendj.ldap.LdapResultHandler<Void> handler)Restores a backup of the contents of this data provider.booleansupportsBackup(BackupConfig backupConfig, StringBuilder unsupportedReason)Indicates whether this data provider provides a mechanism to perform a backup of its contents in a form that can be restored later, based on the provided configuration.
-
-
-
Method Detail
-
createBackup
org.forgerock.opendj.ldap.LdapPromise<Void> createBackup(BackupConfig backupConfig, org.forgerock.opendj.ldap.LdapResultHandler<Void> handler)
Creates a backup of the contents of this data provider in a form that may be restored at a later date if necessary. This method should only be called ifsupportsBackupreturnstrue.Note that the server will not explicitly initialize this data provider before calling this method.
- Parameters:
backupConfig- The configuration to use when performing the backup.handler- A handler which will be notified when the backup completes.- Returns:
- A promise representing the completion of the backup.
-
getDataProviderID
DataProviderID getDataProviderID()
Returns the ID of this data provider.- Returns:
- The ID of this data provider.
-
restoreBackup
org.forgerock.opendj.ldap.LdapPromise<Void> restoreBackup(RestoreConfig restoreConfig, org.forgerock.opendj.ldap.LdapResultHandler<Void> handler)
Restores a backup of the contents of this data provider.Note that the server will not explicitly initialize this data provider before calling this method.
- Parameters:
restoreConfig- The configuration to use when performing the restore.handler- A handler which will be notified when the restore completes.- Returns:
- A promise representing the completion of the restore.
-
supportsBackup
boolean supportsBackup(BackupConfig backupConfig, StringBuilder unsupportedReason)
Indicates whether this data provider provides a mechanism to perform a backup of its contents in a form that can be restored later, based on the provided configuration.- Parameters:
backupConfig- The configuration of the backup for which to make the determination.unsupportedReason- A buffer to which a message can be appended explaining why the requested backup is not supported.- Returns:
trueif this data provider provides a mechanism for performing backups with the provided configuration, orfalseif not.
-
-