All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.reactiverse.elasticsearch.client.IndexLifecycleClientImpl Maven / Gradle / Ivy

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.client.core.AcknowledgedResponse;
import org.elasticsearch.client.indexlifecycle.DeleteLifecyclePolicyRequest;
import org.elasticsearch.client.indexlifecycle.ExplainLifecycleRequest;
import org.elasticsearch.client.indexlifecycle.ExplainLifecycleResponse;
import org.elasticsearch.client.indexlifecycle.GetLifecyclePolicyRequest;
import org.elasticsearch.client.indexlifecycle.GetLifecyclePolicyResponse;
import org.elasticsearch.client.indexlifecycle.LifecycleManagementStatusRequest;
import org.elasticsearch.client.indexlifecycle.LifecycleManagementStatusResponse;
import org.elasticsearch.client.indexlifecycle.PutLifecyclePolicyRequest;
import org.elasticsearch.client.indexlifecycle.RemoveIndexLifecyclePolicyRequest;
import org.elasticsearch.client.indexlifecycle.RemoveIndexLifecyclePolicyResponse;
import org.elasticsearch.client.indexlifecycle.RetryLifecyclePolicyRequest;
import org.elasticsearch.client.indexlifecycle.StartILMRequest;
import org.elasticsearch.client.indexlifecycle.StopILMRequest;
import org.elasticsearch.client.slm.DeleteSnapshotLifecyclePolicyRequest;
import org.elasticsearch.client.slm.ExecuteSnapshotLifecyclePolicyRequest;
import org.elasticsearch.client.slm.ExecuteSnapshotLifecyclePolicyResponse;
import org.elasticsearch.client.slm.ExecuteSnapshotLifecycleRetentionRequest;
import org.elasticsearch.client.slm.GetSnapshotLifecyclePolicyRequest;
import org.elasticsearch.client.slm.GetSnapshotLifecyclePolicyResponse;
import org.elasticsearch.client.slm.GetSnapshotLifecycleStatsRequest;
import org.elasticsearch.client.slm.GetSnapshotLifecycleStatsResponse;
import org.elasticsearch.client.slm.PutSnapshotLifecyclePolicyRequest;
import org.elasticsearch.client.slm.SnapshotLifecycleManagementStatusRequest;
import org.elasticsearch.client.slm.StartSLMRequest;
import org.elasticsearch.client.slm.StopSLMRequest;
import java.io.IOException;
import static java.util.Collections.emptySet;

class IndexLifecycleClientImpl implements IndexLifecycleClient {

    private final Vertx vertx;

    private final org.elasticsearch.client.IndexLifecycleClient delegate;

    IndexLifecycleClientImpl(Vertx vertx, org.elasticsearch.client.IndexLifecycleClient delegate) {
        this.vertx = vertx;
        this.delegate = delegate;
    }

    @Override()
    public void getLifecyclePolicyAsync(GetLifecyclePolicyRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.getLifecyclePolicyAsync(request, options, new ActionListener() {

            @Override
            public void onResponse(GetLifecyclePolicyResponse 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 putLifecyclePolicyAsync(PutLifecyclePolicyRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.putLifecyclePolicyAsync(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 deleteLifecyclePolicyAsync(DeleteLifecyclePolicyRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.deleteLifecyclePolicyAsync(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 removeIndexLifecyclePolicyAsync(RemoveIndexLifecyclePolicyRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.removeIndexLifecyclePolicyAsync(request, options, new ActionListener() {

            @Override
            public void onResponse(RemoveIndexLifecyclePolicyResponse 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 startILMAsync(StartILMRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.startILMAsync(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 stopILMAsync(StopILMRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.stopILMAsync(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 lifecycleManagementStatusAsync(LifecycleManagementStatusRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.lifecycleManagementStatusAsync(request, options, new ActionListener() {

            @Override
            public void onResponse(LifecycleManagementStatusResponse 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 explainLifecycleAsync(ExplainLifecycleRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.explainLifecycleAsync(request, options, new ActionListener() {

            @Override
            public void onResponse(ExplainLifecycleResponse 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 retryLifecyclePolicyAsync(RetryLifecyclePolicyRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.retryLifecyclePolicyAsync(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 getSnapshotLifecyclePolicyAsync(GetSnapshotLifecyclePolicyRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.getSnapshotLifecyclePolicyAsync(request, options, new ActionListener() {

            @Override
            public void onResponse(GetSnapshotLifecyclePolicyResponse 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 putSnapshotLifecyclePolicyAsync(PutSnapshotLifecyclePolicyRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.putSnapshotLifecyclePolicyAsync(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 deleteSnapshotLifecyclePolicyAsync(DeleteSnapshotLifecyclePolicyRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.deleteSnapshotLifecyclePolicyAsync(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 executeSnapshotLifecyclePolicyAsync(ExecuteSnapshotLifecyclePolicyRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.executeSnapshotLifecyclePolicyAsync(request, options, new ActionListener() {

            @Override
            public void onResponse(ExecuteSnapshotLifecyclePolicyResponse 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 executeSnapshotLifecycleRetentionAsync(ExecuteSnapshotLifecycleRetentionRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.executeSnapshotLifecycleRetentionAsync(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 getSnapshotLifecycleStatsAsync(GetSnapshotLifecycleStatsRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.getSnapshotLifecycleStatsAsync(request, options, new ActionListener() {

            @Override
            public void onResponse(GetSnapshotLifecycleStatsResponse 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 startSLMAsync(StartSLMRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.startSLMAsync(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 stopSLMAsync(StopSLMRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.stopSLMAsync(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 getSLMStatusAsync(SnapshotLifecycleManagementStatusRequest request, RequestOptions options, Handler> handler) {
        Context context = vertx.getOrCreateContext();
        delegate.getSLMStatusAsync(request, options, new ActionListener() {

            @Override
            public void onResponse(LifecycleManagementStatusResponse value) {
                context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
            }

            @Override
            public void onFailure(Exception e) {
                context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
            }
        });
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy