Package one.microstream.storage.types
Class StorageBackupHandler.Default
java.lang.Object
one.microstream.storage.types.StorageBackupHandler.Default
- All Implemented Interfaces:
Runnable
,StorageActivePart
,StorageBackupHandler
,StorageBackupInventory
- Enclosing interface:
- StorageBackupHandler
public static final class StorageBackupHandler.Default extends Object implements StorageBackupHandler, StorageBackupInventory
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageBackupHandler
StorageBackupHandler.Default
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
Modifier and Type Method Description void
copyFilePart(StorageLiveChannelFile<?> sourceFile, long sourcePosition, long copyLength)
void
deleteFile(StorageLiveChannelFile<?> file)
StorageBackupDataFile
ensureDataFile(StorageDataFile file)
StorageBackupTransactionsFile
ensureTransactionsFile(StorageTransactionsFile file)
void
initialize(int channelIndex)
boolean
isActive()
Queries whether the part is actually active right now.boolean
isRunning()
void
run()
StorageBackupHandler
setRunning(boolean running)
StorageBackupSetup
setup()
void
synchronize(StorageInventory storageInventory)
void
truncateFile(StorageLiveChannelFile<?> file, long newLength)
-
Constructor Details
-
Default
public Default()
-
-
Method Details
-
setup
- Specified by:
setup
in interfaceStorageBackupHandler
-
isRunning
public final boolean isRunning()- Specified by:
isRunning
in interfaceStorageBackupHandler
-
isActive
public final boolean isActive()Description copied from interface:StorageActivePart
Queries whether the part is actually active right now. This might returntrue
even despite some "running" flag being set tofalse
because there might be one last loop cycle execution before checking the "running" flag again.- Specified by:
isActive
in interfaceStorageActivePart
- Specified by:
isActive
in interfaceStorageBackupHandler
- Returns:
- if the part is actually active right now.
-
setRunning
- Specified by:
setRunning
in interfaceStorageBackupHandler
-
ensureDataFile
- Specified by:
ensureDataFile
in interfaceStorageBackupInventory
-
ensureTransactionsFile
- Specified by:
ensureTransactionsFile
in interfaceStorageBackupInventory
-
initialize
public void initialize(int channelIndex)- Specified by:
initialize
in interfaceStorageBackupHandler
-
synchronize
- Specified by:
synchronize
in interfaceStorageBackupHandler
-
run
public void run() -
copyFilePart
public void copyFilePart(StorageLiveChannelFile<?> sourceFile, long sourcePosition, long copyLength)- Specified by:
copyFilePart
in interfaceStorageBackupHandler
-
truncateFile
- Specified by:
truncateFile
in interfaceStorageBackupHandler
-
deleteFile
- Specified by:
deleteFile
in interfaceStorageBackupHandler
-