Class PartitionTransitionImpl
- java.lang.Object
-
- io.camunda.zeebe.broker.system.partitions.impl.PartitionTransitionImpl
-
- All Implemented Interfaces:
PartitionTransition
public class PartitionTransitionImpl extends Object implements PartitionTransition
-
-
Constructor Summary
Constructors Constructor Description PartitionTransitionImpl(PartitionContext context, List<PartitionStep> leaderSteps, List<PartitionStep> followerSteps)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActorFuture<Void>toFollower(long currentTerm)Transitions to follower asynchronously by closing the current partition's components and opening a follower partition.ActorFuture<Void>toInactive()Closes the current partition's components asynchronously.ActorFuture<Void>toLeader(long currentTerm)Transitions to leader asynchronously by closing the current partition's components and opening a leader partition.
-
-
-
Constructor Detail
-
PartitionTransitionImpl
public PartitionTransitionImpl(PartitionContext context, List<PartitionStep> leaderSteps, List<PartitionStep> followerSteps)
-
-
Method Detail
-
toFollower
public ActorFuture<Void> toFollower(long currentTerm)
Description copied from interface:PartitionTransitionTransitions to follower asynchronously by closing the current partition's components and opening a follower partition.- Specified by:
toFollowerin interfacePartitionTransition- Parameters:
currentTerm- the current term on which the transition happens- Returns:
- an ActorFuture to be completed when the transition is complete
-
toLeader
public ActorFuture<Void> toLeader(long currentTerm)
Description copied from interface:PartitionTransitionTransitions to leader asynchronously by closing the current partition's components and opening a leader partition.- Specified by:
toLeaderin interfacePartitionTransition- Parameters:
currentTerm- the current term on which the transition happens- Returns:
- an ActorFuture to be completed when the transition is complete
-
toInactive
public ActorFuture<Void> toInactive()
Description copied from interface:PartitionTransitionCloses the current partition's components asynchronously.- Specified by:
toInactivein interfacePartitionTransition- Returns:
- an ActorFuture completed when the transition is complete
-
-