Interface PartitionTransition
- All Known Implementing Classes:
PartitionTransitionImpl
public interface PartitionTransition
-
Method Summary
Modifier and TypeMethodDescriptionvoidsetConcurrencyControl(ConcurrencyControl concurrencyControl) Sets the ConcurrencyControl through which tasks are executed.toFollower(long currentTerm) Transitions to follower asynchronously by closing the current partition's components and opening a follower partition.toInactive(long term) Closes the current partition's components asynchronously.toLeader(long currentTerm) Transitions to leader asynchronously by closing the current partition's components and opening a leader partition.voidupdateTransitionContext(PartitionTransitionContext transitionContext) Sets the transition context
-
Method Details
-
toFollower
Transitions to follower asynchronously by closing the current partition's components and opening a follower partition.- Parameters:
currentTerm- the current term on which the transition happens- Returns:
- an ActorFuture to be completed when the transition is complete
-
toLeader
Transitions to leader asynchronously by closing the current partition's components and opening a leader partition.- Parameters:
currentTerm- the current term on which the transition happens- Returns:
- an ActorFuture to be completed when the transition is complete
-
toInactive
Closes the current partition's components asynchronously.- Parameters:
term-- Returns:
- an ActorFuture completed when the transition is complete
-
setConcurrencyControl
Sets the ConcurrencyControl through which tasks are executed.- Parameters:
concurrencyControl- the concurrency control
-
updateTransitionContext
Sets the transition context- Parameters:
transitionContext- the context to be used
-