io.reactiverse.elasticsearch.client.IndicesClientImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticsearch-client-rxjava2 Show documentation
Show all versions of elasticsearch-client-rxjava2 Show documentation
Reactiverse Elasticsearch client :: RxJava2 bindings
The newest version!
/*
[NOTE] This is an automatically generated file.
Do not make changes to this file but to the shim code generator.
*/
package io.reactiverse.elasticsearch.client;
import io.vertx.core.*;
import org.elasticsearch.client.*;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest;
import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest;
import org.elasticsearch.action.admin.indices.cache.clear.ClearIndicesCacheRequest;
import org.elasticsearch.action.admin.indices.cache.clear.ClearIndicesCacheResponse;
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
import org.elasticsearch.action.admin.indices.flush.FlushRequest;
import org.elasticsearch.action.admin.indices.flush.FlushResponse;
import org.elasticsearch.action.admin.indices.flush.SyncedFlushRequest;
import org.elasticsearch.action.admin.indices.forcemerge.ForceMergeRequest;
import org.elasticsearch.action.admin.indices.forcemerge.ForceMergeResponse;
import org.elasticsearch.action.admin.indices.open.OpenIndexRequest;
import org.elasticsearch.action.admin.indices.open.OpenIndexResponse;
import org.elasticsearch.action.admin.indices.refresh.RefreshRequest;
import org.elasticsearch.action.admin.indices.refresh.RefreshResponse;
import org.elasticsearch.action.admin.indices.settings.get.GetSettingsRequest;
import org.elasticsearch.action.admin.indices.settings.get.GetSettingsResponse;
import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest;
import org.elasticsearch.action.admin.indices.template.delete.DeleteIndexTemplateRequest;
import org.elasticsearch.action.admin.indices.validate.query.ValidateQueryRequest;
import org.elasticsearch.action.admin.indices.validate.query.ValidateQueryResponse;
import org.elasticsearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.client.core.ShardsAcknowledgedResponse;
import org.elasticsearch.client.indices.AnalyzeRequest;
import org.elasticsearch.client.indices.AnalyzeResponse;
import org.elasticsearch.client.indices.CloseIndexRequest;
import org.elasticsearch.client.indices.CloseIndexResponse;
import org.elasticsearch.client.indices.ComposableIndexTemplateExistRequest;
import org.elasticsearch.client.indices.CreateDataStreamRequest;
import org.elasticsearch.client.indices.CreateIndexRequest;
import org.elasticsearch.client.indices.CreateIndexResponse;
import org.elasticsearch.client.indices.DataStreamsStatsRequest;
import org.elasticsearch.client.indices.DataStreamsStatsResponse;
import org.elasticsearch.client.indices.DeleteAliasRequest;
import org.elasticsearch.client.indices.DeleteComposableIndexTemplateRequest;
import org.elasticsearch.client.indices.DeleteDataStreamRequest;
import org.elasticsearch.client.indices.FreezeIndexRequest;
import org.elasticsearch.client.indices.GetComposableIndexTemplateRequest;
import org.elasticsearch.client.indices.GetComposableIndexTemplatesResponse;
import org.elasticsearch.client.indices.GetDataStreamRequest;
import org.elasticsearch.client.indices.GetDataStreamResponse;
import org.elasticsearch.client.indices.GetFieldMappingsRequest;
import org.elasticsearch.client.indices.GetFieldMappingsResponse;
import org.elasticsearch.client.indices.GetIndexRequest;
import org.elasticsearch.client.indices.GetIndexResponse;
import org.elasticsearch.client.indices.GetIndexTemplatesRequest;
import org.elasticsearch.client.indices.GetIndexTemplatesResponse;
import org.elasticsearch.client.indices.GetMappingsRequest;
import org.elasticsearch.client.indices.GetMappingsResponse;
import org.elasticsearch.client.indices.IndexTemplatesExistRequest;
import org.elasticsearch.client.indices.PutComposableIndexTemplateRequest;
import org.elasticsearch.client.indices.PutIndexTemplateRequest;
import org.elasticsearch.client.indices.PutMappingRequest;
import org.elasticsearch.client.indices.ReloadAnalyzersRequest;
import org.elasticsearch.client.indices.ReloadAnalyzersResponse;
import org.elasticsearch.client.indices.ResizeRequest;
import org.elasticsearch.client.indices.ResizeResponse;
import org.elasticsearch.client.indices.SimulateIndexTemplateRequest;
import org.elasticsearch.client.indices.SimulateIndexTemplateResponse;
import org.elasticsearch.client.indices.UnfreezeIndexRequest;
import org.elasticsearch.client.indices.rollover.RolloverRequest;
import org.elasticsearch.client.indices.rollover.RolloverResponse;
import org.elasticsearch.rest.RestStatus;
import java.io.IOException;
import java.util.Collections;
import static java.util.Collections.emptySet;
import static java.util.Collections.singleton;
class IndicesClientImpl implements IndicesClient {
private final Vertx vertx;
private final org.elasticsearch.client.IndicesClient delegate;
IndicesClientImpl(Vertx vertx, org.elasticsearch.client.IndicesClient delegate) {
this.vertx = vertx;
this.delegate = delegate;
}
@Override()
public void deleteAsync(DeleteIndexRequest deleteIndexRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.deleteAsync(deleteIndexRequest, options, new ActionListener() {
@Override
public void onResponse(AcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void createAsync(CreateIndexRequest createIndexRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.createAsync(createIndexRequest, options, new ActionListener() {
@Override
public void onResponse(CreateIndexResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void createDataStreamAsync(CreateDataStreamRequest createDataStreamRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.createDataStreamAsync(createDataStreamRequest, options, new ActionListener() {
@Override
public void onResponse(AcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void deleteDataStreamAsync(DeleteDataStreamRequest deleteDataStreamRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.deleteDataStreamAsync(deleteDataStreamRequest, options, new ActionListener() {
@Override
public void onResponse(AcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void getDataStreamAsync(GetDataStreamRequest dataStreamRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.getDataStreamAsync(dataStreamRequest, options, new ActionListener() {
@Override
public void onResponse(GetDataStreamResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void dataStreamsStatsAsync(DataStreamsStatsRequest dataStreamsStatsRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.dataStreamsStatsAsync(dataStreamsStatsRequest, options, new ActionListener() {
@Override
public void onResponse(DataStreamsStatsResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void putMappingAsync(PutMappingRequest putMappingRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.putMappingAsync(putMappingRequest, options, new ActionListener() {
@Override
public void onResponse(AcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void getMappingAsync(GetMappingsRequest getMappingsRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.getMappingAsync(getMappingsRequest, options, new ActionListener() {
@Override
public void onResponse(GetMappingsResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void getFieldMappingAsync(GetFieldMappingsRequest getFieldMappingsRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.getFieldMappingAsync(getFieldMappingsRequest, options, new ActionListener() {
@Override
public void onResponse(GetFieldMappingsResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void updateAliasesAsync(IndicesAliasesRequest indicesAliasesRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.updateAliasesAsync(indicesAliasesRequest, options, new ActionListener() {
@Override
public void onResponse(AcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void openAsync(OpenIndexRequest openIndexRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.openAsync(openIndexRequest, options, new ActionListener() {
@Override
public void onResponse(OpenIndexResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public CloseIndexResponse close(CloseIndexRequest closeIndexRequest, RequestOptions options) {
try {
return delegate.close(closeIndexRequest, options);
} catch (Throwable t) {
throw new RuntimeException(t);
}
}
@Override()
public void closeAsync(CloseIndexRequest closeIndexRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.closeAsync(closeIndexRequest, options, new ActionListener() {
@Override
public void onResponse(CloseIndexResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void existsAliasAsync(GetAliasesRequest getAliasesRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.existsAliasAsync(getAliasesRequest, options, new ActionListener() {
@Override
public void onResponse(Boolean value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void refreshAsync(RefreshRequest refreshRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.refreshAsync(refreshRequest, options, new ActionListener() {
@Override
public void onResponse(RefreshResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void flushAsync(FlushRequest flushRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.flushAsync(flushRequest, options, new ActionListener() {
@Override
public void onResponse(FlushResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void getSettingsAsync(GetSettingsRequest getSettingsRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.getSettingsAsync(getSettingsRequest, options, new ActionListener() {
@Override
public void onResponse(GetSettingsResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void getAsync(GetIndexRequest getIndexRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.getAsync(getIndexRequest, options, new ActionListener() {
@Override
public void onResponse(GetIndexResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void forcemergeAsync(ForceMergeRequest forceMergeRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.forcemergeAsync(forceMergeRequest, options, new ActionListener() {
@Override
public void onResponse(ForceMergeResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void clearCacheAsync(ClearIndicesCacheRequest clearIndicesCacheRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.clearCacheAsync(clearIndicesCacheRequest, options, new ActionListener() {
@Override
public void onResponse(ClearIndicesCacheResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void existsAsync(GetIndexRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.existsAsync(request, options, new ActionListener() {
@Override
public void onResponse(Boolean value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void shrinkAsync(ResizeRequest resizeRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.shrinkAsync(resizeRequest, options, new ActionListener() {
@Override
public void onResponse(ResizeResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void splitAsync(ResizeRequest resizeRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.splitAsync(resizeRequest, options, new ActionListener() {
@Override
public void onResponse(ResizeResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void cloneAsync(ResizeRequest resizeRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.cloneAsync(resizeRequest, options, new ActionListener() {
@Override
public void onResponse(ResizeResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void rolloverAsync(RolloverRequest rolloverRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.rolloverAsync(rolloverRequest, options, new ActionListener() {
@Override
public void onResponse(RolloverResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void getAliasAsync(GetAliasesRequest getAliasesRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.getAliasAsync(getAliasesRequest, options, new ActionListener() {
@Override
public void onResponse(GetAliasesResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void putSettingsAsync(UpdateSettingsRequest updateSettingsRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.putSettingsAsync(updateSettingsRequest, options, new ActionListener() {
@Override
public void onResponse(AcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void putTemplateAsync(PutIndexTemplateRequest putIndexTemplateRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.putTemplateAsync(putIndexTemplateRequest, options, new ActionListener() {
@Override
public void onResponse(AcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void putIndexTemplateAsync(PutComposableIndexTemplateRequest putIndexTemplateRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.putIndexTemplateAsync(putIndexTemplateRequest, options, new ActionListener() {
@Override
public void onResponse(AcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void simulateIndexTemplateAsync(SimulateIndexTemplateRequest simulateIndexTemplateRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.simulateIndexTemplateAsync(simulateIndexTemplateRequest, options, new ActionListener() {
@Override
public void onResponse(SimulateIndexTemplateResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void validateQueryAsync(ValidateQueryRequest validateQueryRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.validateQueryAsync(validateQueryRequest, options, new ActionListener() {
@Override
public void onResponse(ValidateQueryResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void getIndexTemplateAsync(GetComposableIndexTemplateRequest getIndexTemplatesRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.getIndexTemplateAsync(getIndexTemplatesRequest, options, new ActionListener() {
@Override
public void onResponse(GetComposableIndexTemplatesResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void getIndexTemplateAsync(GetIndexTemplatesRequest getIndexTemplatesRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.getIndexTemplateAsync(getIndexTemplatesRequest, options, new ActionListener() {
@Override
public void onResponse(GetIndexTemplatesResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void existsTemplateAsync(IndexTemplatesExistRequest indexTemplatesExistRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.existsTemplateAsync(indexTemplatesExistRequest, options, new ActionListener() {
@Override
public void onResponse(Boolean value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void existsIndexTemplateAsync(ComposableIndexTemplateExistRequest indexTemplatesExistRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.existsIndexTemplateAsync(indexTemplatesExistRequest, options, new ActionListener() {
@Override
public void onResponse(Boolean value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void analyzeAsync(AnalyzeRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.analyzeAsync(request, options, new ActionListener() {
@Override
public void onResponse(AnalyzeResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void freezeAsync(FreezeIndexRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.freezeAsync(request, options, new ActionListener() {
@Override
public void onResponse(ShardsAcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void unfreezeAsync(UnfreezeIndexRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.unfreezeAsync(request, options, new ActionListener() {
@Override
public void onResponse(ShardsAcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void deleteTemplateAsync(DeleteIndexTemplateRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.deleteTemplateAsync(request, options, new ActionListener() {
@Override
public void onResponse(AcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void deleteIndexTemplateAsync(DeleteComposableIndexTemplateRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.deleteIndexTemplateAsync(request, options, new ActionListener() {
@Override
public void onResponse(AcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void reloadAnalyzersAsync(ReloadAnalyzersRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.reloadAnalyzersAsync(request, options, new ActionListener() {
@Override
public void onResponse(ReloadAnalyzersResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void deleteAliasAsync(DeleteAliasRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.deleteAliasAsync(request, options, new ActionListener() {
@Override
public void onResponse(org.elasticsearch.client.core.AcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
}