Interface ReservedClusterStateHandler<T>

Type Parameters:
T - The type used to represent the state update
All Superinterfaces:
ReservedStateHandler<T>
All Known Implementing Classes:
ReservedClusterSettingsAction, ReservedRepositoryAction

public interface ReservedClusterStateHandler<T> extends ReservedStateHandler<T>
ReservedStateHandler for updating cluster-wide cluster state.
  • Method Details

    • transform

      TransformState transform(T source, TransformState prevState) throws Exception
      The transformation method implemented by the handler.

      The transform method of the handler should apply the necessary changes to the cluster state as it normally would in a REST handler. One difference is that the transform method in an reserved state handler must perform all CRUD operations of the cluster state in one go. For that reason, we supply a wrapper class to the cluster state called TransformState, which contains the current cluster state as well as any previous keys set by this handler on prior invocation.

      Parameters:
      source - The parsed information specific to this handler from the combined cluster state content
      prevState - The previous cluster state and keys set by this handler (if any)
      Returns:
      The modified state and the current keys set by this handler
      Throws:
      Exception