From 16c9ba80b442e8f525707d6a475d5cd1f6ac434c Mon Sep 17 00:00:00 2001 From: Tianli Feng Date: Thu, 16 Jun 2022 20:15:33 -0700 Subject: [PATCH] Move deprecated masterNodeTimeout() into ClusterManagerNodeRequest class Signed-off-by: Tianli Feng --- .../clustermanager/ClusterManagerNodeRequest.java | 10 ++++++++++ .../action/support/master/MasterNodeRequest.java | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/server/src/main/java/org/opensearch/action/support/clustermanager/ClusterManagerNodeRequest.java b/server/src/main/java/org/opensearch/action/support/clustermanager/ClusterManagerNodeRequest.java index ed1bddbf248ce..8fa2276bc2100 100644 --- a/server/src/main/java/org/opensearch/action/support/clustermanager/ClusterManagerNodeRequest.java +++ b/server/src/main/java/org/opensearch/action/support/clustermanager/ClusterManagerNodeRequest.java @@ -82,4 +82,14 @@ public final Request clusterManagerNodeTimeout(String timeout) { public final TimeValue clusterManagerNodeTimeout() { return this.clusterManagerNodeTimeout; } + + /** + * Preserve the method so that classes implements AcknowledgedRequest don't need to override it for backwards compatibility.} + * + * @deprecated As of 2.1, because supporting inclusive language, replaced by {@link #clusterManagerNodeTimeout()} + */ + @Deprecated + public final TimeValue masterNodeTimeout() { + return this.clusterManagerNodeTimeout; + } } diff --git a/server/src/main/java/org/opensearch/action/support/master/MasterNodeRequest.java b/server/src/main/java/org/opensearch/action/support/master/MasterNodeRequest.java index ebc802534dd04..6b8fde1db8a32 100644 --- a/server/src/main/java/org/opensearch/action/support/master/MasterNodeRequest.java +++ b/server/src/main/java/org/opensearch/action/support/master/MasterNodeRequest.java @@ -74,9 +74,4 @@ public final Request masterNodeTimeout(TimeValue timeout) { public final Request masterNodeTimeout(String timeout) { return masterNodeTimeout(TimeValue.parseTimeValue(timeout, null, getClass().getSimpleName() + ".masterNodeTimeout")); } - - @Deprecated - public final TimeValue masterNodeTimeout() { - return this.masterNodeTimeout; - } }