Interface RequestValidators.RequestValidator<T extends ActionRequest>

  • Enclosing class:
    RequestValidators<T extends ActionRequest>

    public static interface RequestValidators.RequestValidator<T extends ActionRequest>
    A validator that validates an request associated with indices before executing it.
    • Method Summary

      Modifier and Type Method Description
      java.util.Optional<java.lang.Exception> validateRequest​(T request, ClusterState state, Index[] indices)
      Validates a given request with its associated concrete indices and the current state.
    • Method Detail

      • validateRequest

        java.util.Optional<java.lang.Exception> validateRequest​(T request,
                                                                ClusterState state,
                                                                Index[] indices)
        Validates a given request with its associated concrete indices and the current state.
        Parameters:
        request - the request to validate
        state - the current cluster state
        indices - the concrete indices that associated with the given request
        Returns:
        an optional exception indicates a reason that the given request should be aborted, otherwise empty