Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public RestHighLevelClient(RestClientBuilder restClientBuilder) {

/**
* Creates a {@link RestHighLevelClient} given the low level {@link RestClientBuilder} that allows to build the
* {@link RestClient} to be used to perform requests and parsers for custom response sections added to Elasticsearch through plugins.
* {@link RestClient} to be used to perform requests. and parsers for custom response sections added to Elasticsearch through plugins.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accidental addition of period?

*/
protected RestHighLevelClient(RestClientBuilder restClientBuilder, List<NamedXContentRegistry.Entry> namedXContentEntries) {
this(restClientBuilder.build(), RestClient::close, namedXContentEntries);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,11 @@ public RequestOptions build() {
/**
* Add the provided header to the request.
*/
public void addHeader(String name, String value) {
public Builder addHeader(String name, String value) {
Objects.requireNonNull(name, "header name cannot be null");
Objects.requireNonNull(value, "header value cannot be null");
this.headers.add(new ReqHeader(name, value));
return this;
}

/**
Expand All @@ -182,9 +183,10 @@ public void addHeader(String name, String value) {
* response body gets streamed from a non-blocking HTTP connection on the
* client side.
*/
public void setHttpAsyncResponseConsumerFactory(HttpAsyncResponseConsumerFactory httpAsyncResponseConsumerFactory) {
public Builder setHttpAsyncResponseConsumerFactory(HttpAsyncResponseConsumerFactory httpAsyncResponseConsumerFactory) {
this.httpAsyncResponseConsumerFactory =
Objects.requireNonNull(httpAsyncResponseConsumerFactory, "httpAsyncResponseConsumerFactory cannot be null");
return this;
}

/**
Expand All @@ -204,8 +206,9 @@ public void setHttpAsyncResponseConsumerFactory(HttpAsyncResponseConsumerFactory
* fail the request if the warnings returned don't
* <strong>exactly</strong> match some set.
*/
public void setWarningsHandler(WarningsHandler warningsHandler) {
public Builder setWarningsHandler(WarningsHandler warningsHandler) {
this.warningsHandler = warningsHandler;
return this;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.elasticsearch.xpack.core.indexlifecycle.client.ILMClient;
import org.elasticsearch.xpack.core.ml.client.MachineLearningClient;
import org.elasticsearch.xpack.core.monitoring.client.MonitoringClient;
import org.elasticsearch.xpack.core.security.client.SecurityClient;
import org.elasticsearch.xpack.core.watcher.client.WatcherClient;

import java.util.Collections;
Expand All @@ -39,7 +38,6 @@ public class XPackClient {
private final CcrClient ccrClient;
private final LicensingClient licensingClient;
private final MonitoringClient monitoringClient;
private final SecurityClient securityClient;
private final WatcherClient watcherClient;
private final MachineLearningClient machineLearning;
private final ILMClient ilmClient;
Expand All @@ -49,7 +47,6 @@ public XPackClient(Client client) {
this.ccrClient = new CcrClient(client);
this.licensingClient = new LicensingClient(client);
this.monitoringClient = new MonitoringClient(client);
this.securityClient = new SecurityClient(client);
this.watcherClient = new WatcherClient(client);
this.machineLearning = new MachineLearningClient(client);
this.ilmClient = new ILMClient(client);
Expand All @@ -71,10 +68,6 @@ public MonitoringClient monitoring() {
return monitoringClient;
}

public SecurityClient security() {
return securityClient;
}

public WatcherClient watcher() {
return watcherClient;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
public final class DeletePrivilegesRequestBuilder extends ActionRequestBuilder<DeletePrivilegesRequest, DeletePrivilegesResponse>
implements WriteRequestBuilder<DeletePrivilegesRequestBuilder> {

public DeletePrivilegesRequestBuilder(ElasticsearchClient client, DeletePrivilegesAction action) {
super(client, action, new DeletePrivilegesRequest());
public DeletePrivilegesRequestBuilder(ElasticsearchClient client) {
super(client, DeletePrivilegesAction.INSTANCE, new DeletePrivilegesRequest());
}

public DeletePrivilegesRequestBuilder privileges(String[] privileges) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*/
public final class GetPrivilegesRequestBuilder extends ActionRequestBuilder<GetPrivilegesRequest, GetPrivilegesResponse> {

public GetPrivilegesRequestBuilder(ElasticsearchClient client, GetPrivilegesAction action) {
super(client, action, new GetPrivilegesRequest());
public GetPrivilegesRequestBuilder(ElasticsearchClient client) {
super(client, GetPrivilegesAction.INSTANCE, new GetPrivilegesRequest());
}

public GetPrivilegesRequestBuilder privileges(String... privileges) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
public final class PutPrivilegesRequestBuilder extends ActionRequestBuilder<PutPrivilegesRequest, PutPrivilegesResponse>
implements WriteRequestBuilder<PutPrivilegesRequestBuilder> {

public PutPrivilegesRequestBuilder(ElasticsearchClient client, PutPrivilegesAction action) {
super(client, action, new PutPrivilegesRequest());
public PutPrivilegesRequestBuilder(ElasticsearchClient client) {
super(client, PutPrivilegesAction.INSTANCE, new PutPrivilegesRequest());
}

ApplicationPrivilegeDescriptor parsePrivilege(XContentParser parser, String applicationName, String privilegeName) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
public class DeleteRoleMappingRequestBuilder extends ActionRequestBuilder<DeleteRoleMappingRequest, DeleteRoleMappingResponse>
implements WriteRequestBuilder<DeleteRoleMappingRequestBuilder> {

public DeleteRoleMappingRequestBuilder(ElasticsearchClient client,
DeleteRoleMappingAction action) {
super(client, action, new DeleteRoleMappingRequest());
public DeleteRoleMappingRequestBuilder(ElasticsearchClient client) {
super(client, DeleteRoleMappingAction.INSTANCE, new DeleteRoleMappingRequest());
}

public DeleteRoleMappingRequestBuilder name(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
public class GetRoleMappingsRequestBuilder extends ActionRequestBuilder<GetRoleMappingsRequest, GetRoleMappingsResponse> {

public GetRoleMappingsRequestBuilder(ElasticsearchClient client, GetRoleMappingsAction action) {
super(client, action, new GetRoleMappingsRequest());
public GetRoleMappingsRequestBuilder(ElasticsearchClient client) {
super(client, GetRoleMappingsAction.INSTANCE, new GetRoleMappingsRequest());
}

public GetRoleMappingsRequestBuilder names(String... names) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
public class PutRoleMappingRequestBuilder extends ActionRequestBuilder<PutRoleMappingRequest, PutRoleMappingResponse> implements
WriteRequestBuilder<PutRoleMappingRequestBuilder> {

public PutRoleMappingRequestBuilder(ElasticsearchClient client, PutRoleMappingAction action) {
super(client, action, new PutRoleMappingRequest());
public PutRoleMappingRequestBuilder(ElasticsearchClient client) {
super(client, PutRoleMappingAction.INSTANCE, new PutRoleMappingRequest());
}

/**
Expand Down
Loading