Skip to content

Commit

Permalink
Addressing comments by adding back the protect methods and deprecate …
Browse files Browse the repository at this point in the history
…them.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
  • Loading branch information
Rishikesh1159 committed Jul 29, 2022
1 parent bc67d2e commit 0a806df
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ protected TransportClusterManagerNodeAction(
protected abstract Response read(StreamInput in) throws IOException;

/**
* @deprecated As of 2.1, because supporting inclusive language, replaced by {@link #clusterManagerOperation(ClusterManagerNodeRequest, ClusterState, ActionListener)}
* @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #clusterManagerOperation(ClusterManagerNodeRequest, ClusterState, ActionListener)}
*/
@Deprecated
protected void masterOperation(Request request, ClusterState state, ActionListener<Response> listener) throws Exception {
Expand All @@ -129,6 +129,11 @@ protected void clusterManagerOperation(Request request, ClusterState state, Acti
masterOperation(request, state, listener);
}

/** @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #clusterManagerOperation(Task, ClusterManagerNodeRequest, ClusterState, ActionListener)} */
protected void masterOperation(Task task, Request request, ClusterState state, ActionListener<Response> listener) throws Exception {
clusterManagerOperation(task, request, state, listener);
}

/**
* Override this operation if access to the task parameter is needed
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ protected ClusterBlockException checkBlock(Request request, ClusterState state)
.indicesBlockedException(ClusterBlockLevel.METADATA_READ, indexNameExpressionResolver.concreteIndexNames(state, request));
}

/** @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #clusterManagerOperation(ClusterInfoRequest, ClusterState, ActionListener)} */
@Deprecated
protected final void masterOperation(final Request request, final ClusterState state, final ActionListener<Response> listener) {
clusterManagerOperation(request, state, listener);
}

@Override
protected final void clusterManagerOperation(final Request request, final ClusterState state, final ActionListener<Response> listener) {
String[] concreteIndices = indexNameExpressionResolver.concreteIndexNames(state, request);
Expand All @@ -92,7 +98,7 @@ protected void doClusterManagerOperation(
}

/**
* @deprecated As of 2.1, because supporting inclusive language, replaced by {@link #doClusterManagerOperation(ClusterInfoRequest, String[], ClusterState, ActionListener)}
* @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #doClusterManagerOperation(ClusterInfoRequest, String[], ClusterState, ActionListener)}
*/
@Deprecated
protected void doMasterOperation(Request request, String[] concreteIndices, ClusterState state, ActionListener<Response> listener) {
Expand Down

0 comments on commit 0a806df

Please sign in to comment.