Interface PartitionTransition

All Known Implementing Classes:
PartitionTransitionImpl

public interface PartitionTransition
  • Method Details

    • toFollower

      ActorFuture<Void> toFollower(long currentTerm)
      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. Completed exceptionally with PartitionTransition.CancelledPartitionTransition if the partition was cancelled.
    • toLeader

      ActorFuture<Void> toLeader(long currentTerm)
      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. Completed exceptionally * with PartitionTransition.CancelledPartitionTransition if the partition was cancelled.
    • toInactive

      ActorFuture<Void> toInactive(long term)
      Closes the current partition's components asynchronously.
      Parameters:
      term -
      Returns:
      an ActorFuture completed when the transition is complete. Completed exceptionally * with PartitionTransition.CancelledPartitionTransition if the partition was cancelled.
    • setConcurrencyControl

      void setConcurrencyControl(ConcurrencyControl concurrencyControl)
      Sets the ConcurrencyControl through which tasks are executed.
      Parameters:
      concurrencyControl - the concurrency control
    • updateTransitionContext

      void updateTransitionContext(PartitionTransitionContext transitionContext)
      Sets the transition context
      Parameters:
      transitionContext - the context to be used
    • getHealthIssue

      HealthIssue getHealthIssue()
      Returns:
      null if transition is healthy or a HealthIssue if not.