
co.elastic.clients.elasticsearch.nodes.ElasticsearchNodesClient 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.ElasticsearchException;
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.io.IOException;
import java.util.function.Function;
import javax.annotation.Nullable;
/**
* Client for the nodes namespace.
*/
public class ElasticsearchNodesClient extends ApiClient {
public ElasticsearchNodesClient(ElasticsearchTransport transport) {
super(transport, null);
}
public ElasticsearchNodesClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions) {
super(transport, transportOptions);
}
@Override
public ElasticsearchNodesClient withTransportOptions(@Nullable TransportOptions transportOptions) {
return new ElasticsearchNodesClient(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 ClearRepositoriesMeteringArchiveResponse clearRepositoriesMeteringArchive(
ClearRepositoriesMeteringArchiveRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ClearRepositoriesMeteringArchiveRequest._ENDPOINT;
return this.transport.performRequest(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 ClearRepositoriesMeteringArchiveResponse clearRepositoriesMeteringArchive(
Function> fn)
throws IOException, ElasticsearchException {
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 GetRepositoriesMeteringInfoResponse getRepositoriesMeteringInfo(GetRepositoriesMeteringInfoRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) GetRepositoriesMeteringInfoRequest._ENDPOINT;
return this.transport.performRequest(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 GetRepositoriesMeteringInfoResponse getRepositoriesMeteringInfo(
Function> fn)
throws IOException, ElasticsearchException {
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 HotThreadsResponse hotThreads(HotThreadsRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) HotThreadsRequest._ENDPOINT;
return this.transport.performRequest(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 HotThreadsResponse hotThreads(Function> fn)
throws IOException, ElasticsearchException {
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 HotThreadsResponse hotThreads() throws IOException, ElasticsearchException {
return this.transport.performRequest(new HotThreadsRequest.Builder().build(), HotThreadsRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: nodes.info
/**
* Returns information about nodes in the cluster.
*
* @see Documentation
* on elastic.co
*/
public NodesInfoResponse info(NodesInfoRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) NodesInfoRequest._ENDPOINT;
return this.transport.performRequest(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 NodesInfoResponse info(Function> fn)
throws IOException, ElasticsearchException {
return info(fn.apply(new NodesInfoRequest.Builder()).build());
}
/**
* Returns information about nodes in the cluster.
*
* @see Documentation
* on elastic.co
*/
public NodesInfoResponse info() throws IOException, ElasticsearchException {
return this.transport.performRequest(new NodesInfoRequest.Builder().build(), NodesInfoRequest._ENDPOINT,
this.transportOptions);
}
// ----- Endpoint: nodes.reload_secure_settings
/**
* Reloads secure settings.
*
* @see Documentation
* on elastic.co
*/
public ReloadSecureSettingsResponse reloadSecureSettings(ReloadSecureSettingsRequest request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) ReloadSecureSettingsRequest._ENDPOINT;
return this.transport.performRequest(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 ReloadSecureSettingsResponse reloadSecureSettings(
Function> fn)
throws IOException, ElasticsearchException {
return reloadSecureSettings(fn.apply(new ReloadSecureSettingsRequest.Builder()).build());
}
/**
* Reloads secure settings.
*
* @see Documentation
* on elastic.co
*/
public ReloadSecureSettingsResponse reloadSecureSettings() throws IOException, ElasticsearchException {
return this.transport.performRequest(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 NodesStatsResponse stats(NodesStatsRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) NodesStatsRequest._ENDPOINT;
return this.transport.performRequest(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 NodesStatsResponse stats(Function> fn)
throws IOException, ElasticsearchException {
return stats(fn.apply(new NodesStatsRequest.Builder()).build());
}
/**
* Returns statistical information about nodes in the cluster.
*
* @see Documentation
* on elastic.co
*/
public NodesStatsResponse stats() throws IOException, ElasticsearchException {
return this.transport.performRequest(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 NodesUsageResponse usage(NodesUsageRequest request) throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint endpoint = (JsonEndpoint) NodesUsageRequest._ENDPOINT;
return this.transport.performRequest(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 NodesUsageResponse usage(Function> fn)
throws IOException, ElasticsearchException {
return usage(fn.apply(new NodesUsageRequest.Builder()).build());
}
/**
* Returns low-level information about REST actions usage on nodes.
*
* @see Documentation
* on elastic.co
*/
public NodesUsageResponse usage() throws IOException, ElasticsearchException {
return this.transport.performRequest(new NodesUsageRequest.Builder().build(), NodesUsageRequest._ENDPOINT,
this.transportOptions);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy