Package org.opends.server.backup
Interface Backupable
-
- All Known Subinterfaces:
Storage
- All Known Implementing Classes:
BackendImpl,JEBackend,JEStorage,LDIFBackend,SchemaBackend,TaskBackend
public interface BackupableThis interface must be implemented by backends that support backup and restore. This is designed for backends containing all the data files in the same directory, sub-directories are not supported.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidafterBackup()Performs any necessary processing after a backup is performed.default voidafterRestore()Performs any necessary processing after a restore is performed.default voidbeforeBackup()Performs any necessary processing before a backup is performed.default voidbeforeRestore()Performs any necessary processing before a restore is performed.BackupManager.CountedIterator<BackendFile>getBackendFiles()Returns an iterator that goes over all the backend files.StringgetBackendID()Returns the backend name.PathgetDirectory()Returns the directory containing all the backend files to be backed up.
-
-
-
Method Detail
-
getDirectory
Path getDirectory()
Returns the directory containing all the backend files to be backed up.- Returns:
- the directory containing all the backend files to be backed up.
-
getBackendFiles
BackupManager.CountedIterator<BackendFile> getBackendFiles() throws IOException
Returns an iterator that goes over all the backend files. The iterator may return deleted files, such files must be ignored during iteration.- Returns:
- A backend file iterator.
- Throws:
IOException- If there is an error when trying to find the backend files.
-
getBackendID
String getBackendID()
Returns the backend name.- Returns:
- the backend name.
-
beforeBackup
default void beforeBackup()
Performs any necessary processing before a backup is performed. For example, this can take a shared lock or flush out a memory cache to backend files or delete stale data files.
-
afterBackup
default void afterBackup()
Performs any necessary processing after a backup is performed. This method is called even if backup has failed. For example, this can release a shared lock.
-
beforeRestore
default void beforeRestore()
Performs any necessary processing before a restore is performed. For example, this can take an exclusive lock.
-
afterRestore
default void afterRestore() throws InitializationExceptionPerforms any necessary processing after a restore is performed. This method is called even if restore has failed. For example, this can release an exclusive lock or load the restored files into memory.- Throws:
InitializationException- If an error occurs.
-
-