public interface Checkpointed
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Modifier and Type | Method and Description |
---|---|
CheckpointName |
getCheckpointName() |
void |
restoreFromCheckpoint(CheckpointInputStream input)
Restores state from a checkpoint.
|
default CompletableFuture<Void> |
restoreFromCheckpoint(File directory,
ExecutorService executorService)
Restores state from a checkpoint asynchronously.
|
default CompletableFuture<Void> |
writeToCheckpoint(File directory,
ExecutorService executorService)
Writes a checkpoint to the specified directory asynchronously using the provided executor.
|
void |
writeToCheckpoint(OutputStream output)
Writes a checkpoint of all state to the given output stream.
|
CheckpointName getCheckpointName()
default CompletableFuture<Void> writeToCheckpoint(File directory, ExecutorService executorService)
directory
- where the checkpoint will be writtenexecutorService
- to use when running tasks asynchronouslyvoid writeToCheckpoint(OutputStream output) throws IOException, InterruptedException
InterruptedException
if they get
interrupted while running.output
- the output stream to write toIOException
InterruptedException
default CompletableFuture<Void> restoreFromCheckpoint(File directory, ExecutorService executorService)
directory
- where the checkpoint will be locatedexecutorService
- to use when running asynchronous tasksvoid restoreFromCheckpoint(CheckpointInputStream input) throws IOException
input
- an input stream with checkpoint dataIOException
Copyright © 2023. All Rights Reserved.