Class ExporterDirectorPartitionTransitionStep
- All Implemented Interfaces:
PartitionTransitionStep
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()voidonNewRaftRole(PartitionTransitionContext context, RaftServer.Role newRole) This method is called immediately after the new Raft role is known.prepareTransition(PartitionTransitionContext context, long term, RaftServer.Role targetRole) This method is a hook to prepare steps for a pending transition.transitionTo(PartitionTransitionContext context, long term, RaftServer.Role targetRole) This method is called to start the actual transition
-
Constructor Details
-
ExporterDirectorPartitionTransitionStep
public ExporterDirectorPartitionTransitionStep()
-
-
Method Details
-
onNewRaftRole
Description copied from interface:PartitionTransitionStepThis method is called immediately after the new Raft role is known. It is expected that this method completes instantly. It is called on all steps.Steps are expected to pause any active requests and assume a neutral stance after this method is called. After all steps have been notified, the first steps'
transitionTo(...)will be called, and then subsequently all other steps. This means that during the time between the call to the method and the call totransitionTo(...)some preceding steps may have already transitioned, but others are still waiting for transition.To summarize, after this method is called, the partition is in an undefined state. And as soon as
transitionTo(...)is called the partition has completed all transition steps up to this pointNote, that this may also be called while a transition is currently running, for example if the raft partition transitions faster than the Zeebe partition. In this case steps are encouraged to cancel what they are doing
- Specified by:
onNewRaftRolein interfacePartitionTransitionStepnewRole- target role to transition to
-
prepareTransition
public ActorFuture<Void> prepareTransition(PartitionTransitionContext context, long term, RaftServer.Role targetRole) Description copied from interface:PartitionTransitionStepThis method is a hook to prepare steps for a pending transition. This method is deprecated because eventually we want ro remove it. Once removed, all steps need to take the necessary preparatory steps as part ofnewRaftRole(...).For a time being, however, this method will be supported. Steps will be called in reverse order and are expected to take any steps to assume a neutral stance
- Specified by:
prepareTransitionin interfacePartitionTransitionStep
-
transitionTo
public ActorFuture<Void> transitionTo(PartitionTransitionContext context, long term, RaftServer.Role targetRole) Description copied from interface:PartitionTransitionStepThis method is called to start the actual transition- Specified by:
transitionToin interfacePartitionTransitionStep
-
getName
- Specified by:
getNamein interfacePartitionTransitionStep- Returns:
- A log-friendly identification of the PartitionTransitionStep.
-