Class FileStoreBackupRestoreImpl
- java.lang.Object
-
- org.apache.jackrabbit.oak.backup.impl.FileStoreBackupRestoreImpl
-
- All Implemented Interfaces:
FileStoreBackupRestoreMBean
public class FileStoreBackupRestoreImpl extends Object implements FileStoreBackupRestoreMBean
Default implementation ofFileStoreBackupRestoreMBeanbased on a file.
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.api.jmx.FileStoreBackupRestoreMBean
TYPE
-
-
Constructor Summary
Constructors Constructor Description FileStoreBackupRestoreImpl(@NotNull SegmentNodeStore store, @NotNull Revisions revisions, @NotNull SegmentReader reader, @NotNull File file, @NotNull Executor executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Stringcheckpoint(long lifetime)Creates a new checkpoint of the latest root of the tree.@NotNull CompositeDatagetBackupStatus()Backup status@NotNull CompositeDatagetRestoreStatus()Restore status@NotNull CompositeDatastartBackup()Initiate a backup operation.@NotNull CompositeDatastartRestore()Initiate a restore operation.
-
-
-
Constructor Detail
-
FileStoreBackupRestoreImpl
public FileStoreBackupRestoreImpl(@NotNull @NotNull SegmentNodeStore store, @NotNull @NotNull Revisions revisions, @NotNull @NotNull SegmentReader reader, @NotNull @NotNull File file, @NotNull @NotNull Executor executor)- Parameters:
store- store to back up from or restore tofile- file to back up to or restore fromexecutor- executor for running the back up or restore operation
-
-
Method Detail
-
startBackup
@NotNull public @NotNull CompositeData startBackup()
Description copied from interface:FileStoreBackupRestoreMBeanInitiate a backup operation.- Specified by:
startBackupin interfaceFileStoreBackupRestoreMBean- Returns:
- the status of the operation right after it was initiated
-
getBackupStatus
@NotNull public @NotNull CompositeData getBackupStatus()
Description copied from interface:FileStoreBackupRestoreMBeanBackup status- Specified by:
getBackupStatusin interfaceFileStoreBackupRestoreMBean- Returns:
- the status of the ongoing operation or if none the terminal status of the last operation or Status not available if none.
-
startRestore
@NotNull public @NotNull CompositeData startRestore()
Description copied from interface:FileStoreBackupRestoreMBeanInitiate a restore operation.- Specified by:
startRestorein interfaceFileStoreBackupRestoreMBean- Returns:
- the status of the operation right after it was initiated
-
getRestoreStatus
@NotNull public @NotNull CompositeData getRestoreStatus()
Description copied from interface:FileStoreBackupRestoreMBeanRestore status- Specified by:
getRestoreStatusin interfaceFileStoreBackupRestoreMBean- Returns:
- the status of the ongoing operation or if none the terminal status of the last operation or Status not available if none.
-
checkpoint
@NotNull public @NotNull String checkpoint(long lifetime)
Description copied from interface:FileStoreBackupRestoreMBeanCreates a new checkpoint of the latest root of the tree. The checkpoint remains valid for at least as long as requested and allows that state of the repository to be retrieved using the returned opaque string reference.- Specified by:
checkpointin interfaceFileStoreBackupRestoreMBean- Parameters:
lifetime- time (in milliseconds, > 0) that the checkpoint should remain available- Returns:
- string reference of this checkpoint
-
-