Interface ConfigurationChangeAppliers.ClusterOperationApplier

All Known Subinterfaces:
ConfigurationChangeAppliers.MemberOperationApplier
All Known Implementing Classes:
MemberLeaveApplier, NoopConfigurationChangeAppliers.NoopApplier, PartitionBootstrapApplier, PartitionReconfigurePriorityApplier
Enclosing interface:
ConfigurationChangeAppliers

public static interface ConfigurationChangeAppliers.ClusterOperationApplier
An operation applier that can apply and operation and changes the ClusterConfiguration.
  • Method Details

    • init

      This method will be called before invoking apply(). This method can be used to validate the operation and to update the ClusterConfiguration to mark the start of the operation. For example, an operation for joining a partition can mark the state as JOINING.
      Returns:
      an either which contains an exception if the operation is not valid, or a function to update the cluster configuration
    • apply

      Applies the operation. This can be run asynchronously and should complete the future when the operation is completed. The future should be completed with a function that can update the ClusterConfiguration to mark the operation as completed. For example, an operation for joining a partition should mark the state of the partition as ACTIVE.

      It is expected that no other operation is applied until this operation is completed. It is guaranteed that the ClusterConfiguration updated by ClusterConfiguration.init() remains the same until this operation is completed.

      Returns:
      the future which is completed when the operation is completed successfully or failed.