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 ofFileStoreBackupRestoreMBean
based 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 String
checkpoint(long lifetime)
Creates a new checkpoint of the latest root of the tree.@NotNull CompositeData
getBackupStatus()
Backup status@NotNull CompositeData
getRestoreStatus()
Restore status@NotNull CompositeData
startBackup()
Initiate a backup operation.@NotNull CompositeData
startRestore()
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:FileStoreBackupRestoreMBean
Initiate a backup operation.- Specified by:
startBackup
in interfaceFileStoreBackupRestoreMBean
- Returns:
- the status of the operation right after it was initiated
-
getBackupStatus
@NotNull public @NotNull CompositeData getBackupStatus()
Description copied from interface:FileStoreBackupRestoreMBean
Backup status- Specified by:
getBackupStatus
in 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:FileStoreBackupRestoreMBean
Initiate a restore operation.- Specified by:
startRestore
in interfaceFileStoreBackupRestoreMBean
- Returns:
- the status of the operation right after it was initiated
-
getRestoreStatus
@NotNull public @NotNull CompositeData getRestoreStatus()
Description copied from interface:FileStoreBackupRestoreMBean
Restore status- Specified by:
getRestoreStatus
in 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:FileStoreBackupRestoreMBean
Creates 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:
checkpoint
in interfaceFileStoreBackupRestoreMBean
- Parameters:
lifetime
- time (in milliseconds, > 0) that the checkpoint should remain available- Returns:
- string reference of this checkpoint
-
-