Interface RaftActorRecoveryCohort
@NonNullByDefault
public interface RaftActorRecoveryCohort
Interface for a class that participates in raft actor persistence recovery.
- Author:
- Thomas Pantelis
-
Method Summary
Modifier and TypeMethodDescriptionvoidappendRecoveredCommand(StateCommand command) This method is called during recovery to append aStateCommandto the current batch.voidThis method is called during recovery at the end of a batch to apply the current batched commands.voidapplyRecoveredSnapshot(StateSnapshot snapshot) This method is called during recovery to reconstruct the state of the actor.voidstartLogRecoveryBatch(int maxBatchSize) This method is called during recovery at the start of a batch of state entries.
-
Method Details
-
startLogRecoveryBatch
void startLogRecoveryBatch(int maxBatchSize) This method is called during recovery at the start of a batch of state entries. Derived classes should perform any initialization needed to start a batch.- Parameters:
maxBatchSize- the maximum batch size.
-
appendRecoveredCommand
This method is called during recovery to append aStateCommandto the current batch. This method is called 1 or more times afterstartLogRecoveryBatch(int).- Parameters:
command- the command
-
applyRecoveredSnapshot
This method is called during recovery to reconstruct the state of the actor.- Parameters:
snapshot- theStateSnapshotto apply
-
applyCurrentLogRecoveryBatch
void applyCurrentLogRecoveryBatch()This method is called during recovery at the end of a batch to apply the current batched commands. This method is called afterappendRecoveredCommand(StateCommand).
-