@ThreadSafe public class CheckpointsCleaner extends Object implements Serializable, AutoCloseableAsync
Constructor and Description |
---|
CheckpointsCleaner() |
Modifier and Type | Method and Description |
---|---|
void |
addSubsumedCheckpoint(CompletedCheckpoint completedCheckpoint)
Add one subsumed checkpoint to CheckpointsCleaner, the subsumed checkpoint would be discarded
at
cleanSubsumedCheckpoints(long, Set, Runnable, Executor) . |
void |
cleanCheckpoint(Checkpoint checkpoint,
boolean shouldDiscard,
Runnable postCleanAction,
Executor executor) |
void |
cleanCheckpointOnFailedStoring(CompletedCheckpoint completedCheckpoint,
Executor executor) |
void |
cleanSubsumedCheckpoints(long upTo,
Set<Long> stillInUse,
Runnable postCleanAction,
Executor executor)
Clean checkpoint that is not in the given .
|
CompletableFuture<Void> |
closeAsync()
Trigger the closing of the resource and return the corresponding close future.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public void cleanCheckpoint(Checkpoint checkpoint, boolean shouldDiscard, Runnable postCleanAction, Executor executor)
public void addSubsumedCheckpoint(CompletedCheckpoint completedCheckpoint)
cleanSubsumedCheckpoints(long, Set, Runnable, Executor)
.completedCheckpoint
- which is subsumed.public void cleanSubsumedCheckpoints(long upTo, Set<Long> stillInUse, Runnable postCleanAction, Executor executor)
upTo
- lowest CheckpointID which is still valid.stillInUse
- the state of those checkpoints are still referenced.postCleanAction
- post action after cleaning.executor
- is used to perform the cleanup logic.public void cleanCheckpointOnFailedStoring(CompletedCheckpoint completedCheckpoint, Executor executor)
public CompletableFuture<Void> closeAsync()
AutoCloseableAsync
closeAsync
in interface AutoCloseableAsync
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.