public class SnapshotRestoreProcess extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SNAPSHOT_RESTORE_METRICS
Snapshot restore metrics prefix.
|
static String |
TMP_CACHE_DIR_PREFIX
Temporary cache directory prefix.
|
| Constructor and Description |
|---|
SnapshotRestoreProcess(GridKernalContext ctx,
ThreadLocal<ByteBuffer> locBuff) |
| Modifier and Type | Method and Description |
|---|---|
Set<UUID> |
cacheStartRequiredAliveNodes(IgniteUuid reqId) |
IgniteFuture<Boolean> |
cancel(UUID reqId,
String snpName)
Cancel the currently running local restore procedure.
|
protected void |
cleanup()
Cleanup temporary directories if any exists.
|
void |
interrupt(IgniteCheckedException reason)
Interrupt the currently running local restore procedure.
|
boolean |
isRestoring(CacheConfiguration<?,?> ccfg) |
void |
onNodeLeft(UUID leftNodeId)
Node left callback.
|
protected void |
registerMetrics()
Register local metrics.
|
@Nullable String |
restoringSnapshotName()
Get the name of the snapshot currently being restored
|
IgniteFutureImpl<Void> |
start(String snpName,
@Nullable String snpPath,
@Nullable Collection<String> cacheGrpNames,
int incIdx,
boolean check)
Start cache group restore operation.
|
public static final String TMP_CACHE_DIR_PREFIX
public static final String SNAPSHOT_RESTORE_METRICS
public SnapshotRestoreProcess(GridKernalContext ctx, ThreadLocal<ByteBuffer> locBuff)
ctx - Kernal context.locBuff - Thread local page buffer.protected void cleanup()
throws IgniteCheckedException
IgniteCheckedException - If it was not possible to delete some temporary directory.protected void registerMetrics()
public IgniteFutureImpl<Void> start(String snpName, @Nullable @Nullable String snpPath, @Nullable @Nullable Collection<String> cacheGrpNames, int incIdx, boolean check)
snpName - Snapshot name.snpPath - Snapshot directory path.cacheGrpNames - Cache groups to be restored or null to restore all cache groups from the snapshot.incIdx - Index of incremental snapshot.check - If true check snapshot before restore.@Nullable public @Nullable String restoringSnapshotName()
null if the restore process is not running.public boolean isRestoring(CacheConfiguration<?,?> ccfg)
ccfg - Cache configuration.True if the cache or group with the specified name is currently being restored.public Set<UUID> cacheStartRequiredAliveNodes(IgniteUuid reqId)
reqId - Request ID.public void onNodeLeft(UUID leftNodeId)
leftNodeId - Left node ID.public IgniteFuture<Boolean> cancel(UUID reqId, @Deprecated String snpName)
reqId - Snapshot operation request ID.snpName - Snapshot name.false if the restore process with the specified snapshot name is not running at all.public void interrupt(IgniteCheckedException reason)
reason - Interruption reason.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023