mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-08 22:14:59 +00:00
Client: Deprecate many argument performRequest (#30315)
Deprecate the many arguments versions of `performRequest` and `performRequestAsync` in favor of the `Request` object flavored variants introduced in #29623. We'll be dropping the many arguments variants in 7.0 because they make it difficult to add new features in a backwards compatible way and they create a *ton* of intellisense noise.
This commit is contained in:
parent
d20e8e2bb4
commit
b062ce5634
@ -210,7 +210,9 @@ public class RestClient implements Closeable {
|
|||||||
* @throws IOException in case of a problem or the connection was aborted
|
* @throws IOException in case of a problem or the connection was aborted
|
||||||
* @throws ClientProtocolException in case of an http protocol error
|
* @throws ClientProtocolException in case of an http protocol error
|
||||||
* @throws ResponseException in case Elasticsearch responded with a status code that indicated an error
|
* @throws ResponseException in case Elasticsearch responded with a status code that indicated an error
|
||||||
|
* @deprecated prefer {@link #performRequest(Request)}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public Response performRequest(String method, String endpoint, Header... headers) throws IOException {
|
public Response performRequest(String method, String endpoint, Header... headers) throws IOException {
|
||||||
Request request = new Request(method, endpoint);
|
Request request = new Request(method, endpoint);
|
||||||
request.setHeaders(headers);
|
request.setHeaders(headers);
|
||||||
@ -229,7 +231,9 @@ public class RestClient implements Closeable {
|
|||||||
* @throws IOException in case of a problem or the connection was aborted
|
* @throws IOException in case of a problem or the connection was aborted
|
||||||
* @throws ClientProtocolException in case of an http protocol error
|
* @throws ClientProtocolException in case of an http protocol error
|
||||||
* @throws ResponseException in case Elasticsearch responded with a status code that indicated an error
|
* @throws ResponseException in case Elasticsearch responded with a status code that indicated an error
|
||||||
|
* @deprecated prefer {@link #performRequest(Request)}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public Response performRequest(String method, String endpoint, Map<String, String> params, Header... headers) throws IOException {
|
public Response performRequest(String method, String endpoint, Map<String, String> params, Header... headers) throws IOException {
|
||||||
Request request = new Request(method, endpoint);
|
Request request = new Request(method, endpoint);
|
||||||
addParameters(request, params);
|
addParameters(request, params);
|
||||||
@ -252,7 +256,9 @@ public class RestClient implements Closeable {
|
|||||||
* @throws IOException in case of a problem or the connection was aborted
|
* @throws IOException in case of a problem or the connection was aborted
|
||||||
* @throws ClientProtocolException in case of an http protocol error
|
* @throws ClientProtocolException in case of an http protocol error
|
||||||
* @throws ResponseException in case Elasticsearch responded with a status code that indicated an error
|
* @throws ResponseException in case Elasticsearch responded with a status code that indicated an error
|
||||||
|
* @deprecated prefer {@link #performRequest(Request)}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public Response performRequest(String method, String endpoint, Map<String, String> params,
|
public Response performRequest(String method, String endpoint, Map<String, String> params,
|
||||||
HttpEntity entity, Header... headers) throws IOException {
|
HttpEntity entity, Header... headers) throws IOException {
|
||||||
Request request = new Request(method, endpoint);
|
Request request = new Request(method, endpoint);
|
||||||
@ -289,7 +295,9 @@ public class RestClient implements Closeable {
|
|||||||
* @throws IOException in case of a problem or the connection was aborted
|
* @throws IOException in case of a problem or the connection was aborted
|
||||||
* @throws ClientProtocolException in case of an http protocol error
|
* @throws ClientProtocolException in case of an http protocol error
|
||||||
* @throws ResponseException in case Elasticsearch responded with a status code that indicated an error
|
* @throws ResponseException in case Elasticsearch responded with a status code that indicated an error
|
||||||
|
* @deprecated prefer {@link #performRequest(Request)}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public Response performRequest(String method, String endpoint, Map<String, String> params,
|
public Response performRequest(String method, String endpoint, Map<String, String> params,
|
||||||
HttpEntity entity, HttpAsyncResponseConsumerFactory httpAsyncResponseConsumerFactory,
|
HttpEntity entity, HttpAsyncResponseConsumerFactory httpAsyncResponseConsumerFactory,
|
||||||
Header... headers) throws IOException {
|
Header... headers) throws IOException {
|
||||||
@ -310,7 +318,9 @@ public class RestClient implements Closeable {
|
|||||||
* @param endpoint the path of the request (without host and port)
|
* @param endpoint the path of the request (without host and port)
|
||||||
* @param responseListener the {@link ResponseListener} to notify when the request is completed or fails
|
* @param responseListener the {@link ResponseListener} to notify when the request is completed or fails
|
||||||
* @param headers the optional request headers
|
* @param headers the optional request headers
|
||||||
|
* @deprecated prefer {@link #performRequestAsync(Request, ResponseListener)}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public void performRequestAsync(String method, String endpoint, ResponseListener responseListener, Header... headers) {
|
public void performRequestAsync(String method, String endpoint, ResponseListener responseListener, Header... headers) {
|
||||||
Request request;
|
Request request;
|
||||||
try {
|
try {
|
||||||
@ -333,7 +343,9 @@ public class RestClient implements Closeable {
|
|||||||
* @param params the query_string parameters
|
* @param params the query_string parameters
|
||||||
* @param responseListener the {@link ResponseListener} to notify when the request is completed or fails
|
* @param responseListener the {@link ResponseListener} to notify when the request is completed or fails
|
||||||
* @param headers the optional request headers
|
* @param headers the optional request headers
|
||||||
|
* @deprecated prefer {@link #performRequestAsync(Request, ResponseListener)}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public void performRequestAsync(String method, String endpoint, Map<String, String> params,
|
public void performRequestAsync(String method, String endpoint, Map<String, String> params,
|
||||||
ResponseListener responseListener, Header... headers) {
|
ResponseListener responseListener, Header... headers) {
|
||||||
Request request;
|
Request request;
|
||||||
@ -361,7 +373,9 @@ public class RestClient implements Closeable {
|
|||||||
* @param entity the body of the request, null if not applicable
|
* @param entity the body of the request, null if not applicable
|
||||||
* @param responseListener the {@link ResponseListener} to notify when the request is completed or fails
|
* @param responseListener the {@link ResponseListener} to notify when the request is completed or fails
|
||||||
* @param headers the optional request headers
|
* @param headers the optional request headers
|
||||||
|
* @deprecated prefer {@link #performRequestAsync(Request, ResponseListener)}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public void performRequestAsync(String method, String endpoint, Map<String, String> params,
|
public void performRequestAsync(String method, String endpoint, Map<String, String> params,
|
||||||
HttpEntity entity, ResponseListener responseListener, Header... headers) {
|
HttpEntity entity, ResponseListener responseListener, Header... headers) {
|
||||||
Request request;
|
Request request;
|
||||||
@ -394,7 +408,9 @@ public class RestClient implements Closeable {
|
|||||||
* connection on the client side.
|
* connection on the client side.
|
||||||
* @param responseListener the {@link ResponseListener} to notify when the request is completed or fails
|
* @param responseListener the {@link ResponseListener} to notify when the request is completed or fails
|
||||||
* @param headers the optional request headers
|
* @param headers the optional request headers
|
||||||
|
* @deprecated prefer {@link #performRequestAsync(Request, ResponseListener)}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public void performRequestAsync(String method, String endpoint, Map<String, String> params,
|
public void performRequestAsync(String method, String endpoint, Map<String, String> params,
|
||||||
HttpEntity entity, HttpAsyncResponseConsumerFactory httpAsyncResponseConsumerFactory,
|
HttpEntity entity, HttpAsyncResponseConsumerFactory httpAsyncResponseConsumerFactory,
|
||||||
ResponseListener responseListener, Header... headers) {
|
ResponseListener responseListener, Header... headers) {
|
||||||
|
@ -139,8 +139,11 @@ coming[6.4.0]
|
|||||||
//[float]
|
//[float]
|
||||||
//=== Breaking Java Changes
|
//=== Breaking Java Changes
|
||||||
|
|
||||||
//[float]
|
[float]
|
||||||
//=== Deprecations
|
=== Deprecations
|
||||||
|
|
||||||
|
Deprecated multi-argument versions of the request methods in the RestClient.
|
||||||
|
Prefer the "Request" object flavored methods. ({pull}30315[#30315])
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
=== New Features
|
=== New Features
|
||||||
@ -157,8 +160,8 @@ analysis module. ({pull}30397[#30397])
|
|||||||
|
|
||||||
{ref-64}/breaking_64_api_changes.html#copy-source-settings-on-resize[Allow copying source settings on index resize operations] ({pull}30255[#30255])
|
{ref-64}/breaking_64_api_changes.html#copy-source-settings-on-resize[Allow copying source settings on index resize operations] ({pull}30255[#30255])
|
||||||
|
|
||||||
Added new "Request" object flavored request methods. Prefer these instead of the
|
Added new "Request" object flavored request methods in the RestClient. Prefer
|
||||||
multi-argument versions. ({pull}29623[#29623])
|
these instead of the multi-argument versions. ({pull}29623[#29623])
|
||||||
|
|
||||||
The cluster state listener to decide if watcher should be
|
The cluster state listener to decide if watcher should be
|
||||||
stopped/started/paused now runs far less code in an executor but is more
|
stopped/started/paused now runs far less code in an executor but is more
|
||||||
|
Loading…
x
Reference in New Issue
Block a user