co.elastic.clients.elasticsearch.nodes.ElasticsearchNodesAsyncClient Maven / Gradle / Ivy
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//----------------------------------------------------
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
//----------------------------------------------------
package co.elastic.clients.elasticsearch.nodes;
import co.elastic.clients.ApiClient;
import co.elastic.clients.elasticsearch._types.ErrorResponse;
import co.elastic.clients.transport.ElasticsearchTransport;
import co.elastic.clients.transport.Endpoint;
import co.elastic.clients.transport.JsonEndpoint;
import co.elastic.clients.transport.Transport;
import co.elastic.clients.transport.TransportOptions;
import co.elastic.clients.util.ObjectBuilder;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;
import javax.annotation.Nullable;
/**
* Client for the nodes namespace.
*/
public class ElasticsearchNodesAsyncClient extends ApiClient {
public ElasticsearchNodesAsyncClient(ElasticsearchTransport transport) {
super(transport, null);
}
public ElasticsearchNodesAsyncClient(ElasticsearchTransport transport,
@Nullable TransportOptions transportOptions) {
super(transport, transportOptions);
}
@Override
public ElasticsearchNodesAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) {
return new ElasticsearchNodesAsyncClient(this.transport, transportOptions);
}
// ----- Endpoint: nodes.clear_repositories_metering_archive
/**
* Removes the archived repositories metering information present in the
* cluster.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture clearRepositoriesMeteringArchive(
ClearRepositoriesMeteringArchiveRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ClearRepositoriesMeteringArchiveRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Removes the archived repositories metering information present in the
* cluster.
*
* @param fn
* a function that initializes a builder to create the
* {@link ClearRepositoriesMeteringArchiveRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture clearRepositoriesMeteringArchive(
Function> fn) {
return clearRepositoriesMeteringArchive(
fn.apply(new ClearRepositoriesMeteringArchiveRequest.Builder()).build());
}
// ----- Endpoint: nodes.get_repositories_metering_info
/**
* Returns cluster repositories metering information.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture getRepositoriesMeteringInfo(
GetRepositoriesMeteringInfoRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetRepositoriesMeteringInfoRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Returns cluster repositories metering information.
*
* @param fn
* a function that initializes a builder to create the
* {@link GetRepositoriesMeteringInfoRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture getRepositoriesMeteringInfo(
Function> fn) {
return getRepositoriesMeteringInfo(fn.apply(new GetRepositoriesMeteringInfoRequest.Builder()).build());
}
// ----- Endpoint: nodes.hot_threads
/**
* Returns information about hot threads on each node in the cluster.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture hotThreads(HotThreadsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) HotThreadsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Returns information about hot threads on each node in the cluster.
*
* @param fn
* a function that initializes a builder to create the
* {@link HotThreadsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture hotThreads(
Function> fn) {
return hotThreads(fn.apply(new HotThreadsRequest.Builder()).build());
}
/**
* Returns information about hot threads on each node in the cluster.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture hotThreads() {
return this.transport.performRequestAsync(new HotThreadsRequest.Builder().build(), HotThreadsRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: nodes.info
/**
* Returns information about nodes in the cluster.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture info(NodesInfoRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) NodesInfoRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Returns information about nodes in the cluster.
*
* @param fn
* a function that initializes a builder to create the
* {@link NodesInfoRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture info(
Function> fn) {
return info(fn.apply(new NodesInfoRequest.Builder()).build());
}
/**
* Returns information about nodes in the cluster.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture info() {
return this.transport.performRequestAsync(new NodesInfoRequest.Builder().build(), NodesInfoRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: nodes.reload_secure_settings
/**
* Reloads secure settings.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture reloadSecureSettings(ReloadSecureSettingsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ReloadSecureSettingsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Reloads secure settings.
*
* @param fn
* a function that initializes a builder to create the
* {@link ReloadSecureSettingsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture reloadSecureSettings(
Function> fn) {
return reloadSecureSettings(fn.apply(new ReloadSecureSettingsRequest.Builder()).build());
}
/**
* Reloads secure settings.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture reloadSecureSettings() {
return this.transport.performRequestAsync(new ReloadSecureSettingsRequest.Builder().build(),
ReloadSecureSettingsRequest._ENDPOINT, this.transportOptions);
}
// ----- Endpoint: nodes.stats
/**
* Returns statistical information about nodes in the cluster.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture stats(NodesStatsRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) NodesStatsRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Returns statistical information about nodes in the cluster.
*
* @param fn
* a function that initializes a builder to create the
* {@link NodesStatsRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture stats(
Function> fn) {
return stats(fn.apply(new NodesStatsRequest.Builder()).build());
}
/**
* Returns statistical information about nodes in the cluster.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture stats() {
return this.transport.performRequestAsync(new NodesStatsRequest.Builder().build(), NodesStatsRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: nodes.usage
/**
* Returns low-level information about REST actions usage on nodes.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture usage(NodesUsageRequest request) {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) NodesUsageRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
/**
* Returns low-level information about REST actions usage on nodes.
*
* @param fn
* a function that initializes a builder to create the
* {@link NodesUsageRequest}
* @see Documentation
* on elastic.co
*/
public final CompletableFuture usage(
Function> fn) {
return usage(fn.apply(new NodesUsageRequest.Builder()).build());
}
/**
* Returns low-level information about REST actions usage on nodes.
*
* @see Documentation
* on elastic.co
*/
public CompletableFuture usage() {
return this.transport.performRequestAsync(new NodesUsageRequest.Builder().build(), NodesUsageRequest._ENDPOINT,
this.transportOptions);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy