io.reactiverse.elasticsearch.client.reactivex.SnapshotClient 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
/*
* Copyright 2014 Red Hat, Inc.
*
* Red Hat 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.
*/
package io.reactiverse.elasticsearch.client.reactivex;
import java.util.Map;
import io.reactivex.Observable;
import io.reactivex.Flowable;
import io.reactivex.Single;
import io.reactivex.Completable;
import io.reactivex.Maybe;
import org.elasticsearch.action.admin.cluster.repositories.delete.DeleteRepositoryRequest;
import org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryRequest;
import org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse;
import org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse;
import org.elasticsearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequest;
import org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest;
import org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesResponse;
import org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryRequest;
import org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest;
import org.elasticsearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryRequest;
import org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusRequest;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryResponse;
import io.vertx.core.AsyncResult;
import org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequest;
import org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesRequest;
import io.vertx.core.Handler;
import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse;
import org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse;
import org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse;
@io.vertx.lang.rx.RxGen(io.reactiverse.elasticsearch.client.SnapshotClient.class)
public class SnapshotClient {
@Override
public String toString() {
return delegate.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SnapshotClient that = (SnapshotClient) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
public static final io.vertx.lang.rx.TypeArg __TYPE_ARG = new io.vertx.lang.rx.TypeArg<>( obj -> new SnapshotClient((io.reactiverse.elasticsearch.client.SnapshotClient) obj),
SnapshotClient::getDelegate
);
private final io.reactiverse.elasticsearch.client.SnapshotClient delegate;
public SnapshotClient(io.reactiverse.elasticsearch.client.SnapshotClient delegate) {
this.delegate = delegate;
}
public io.reactiverse.elasticsearch.client.SnapshotClient getDelegate() {
return delegate;
}
public void getRepositoryAsync(GetRepositoriesRequest getRepositoriesRequest, RequestOptions options, Handler> handler) {
delegate.getRepositoryAsync(getRepositoriesRequest, options, handler);
}
public Single rxGetRepositoryAsync(GetRepositoriesRequest getRepositoriesRequest, RequestOptions options) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
getRepositoryAsync(getRepositoriesRequest, options, handler);
});
}
public void createRepositoryAsync(PutRepositoryRequest putRepositoryRequest, RequestOptions options, Handler> handler) {
delegate.createRepositoryAsync(putRepositoryRequest, options, handler);
}
public Single rxCreateRepositoryAsync(PutRepositoryRequest putRepositoryRequest, RequestOptions options) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
createRepositoryAsync(putRepositoryRequest, options, handler);
});
}
public void deleteRepositoryAsync(DeleteRepositoryRequest deleteRepositoryRequest, RequestOptions options, Handler> handler) {
delegate.deleteRepositoryAsync(deleteRepositoryRequest, options, handler);
}
public Single rxDeleteRepositoryAsync(DeleteRepositoryRequest deleteRepositoryRequest, RequestOptions options) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
deleteRepositoryAsync(deleteRepositoryRequest, options, handler);
});
}
public void verifyRepositoryAsync(VerifyRepositoryRequest verifyRepositoryRequest, RequestOptions options, Handler> handler) {
delegate.verifyRepositoryAsync(verifyRepositoryRequest, options, handler);
}
public Single rxVerifyRepositoryAsync(VerifyRepositoryRequest verifyRepositoryRequest, RequestOptions options) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
verifyRepositoryAsync(verifyRepositoryRequest, options, handler);
});
}
public void cleanupRepositoryAsync(CleanupRepositoryRequest cleanupRepositoryRequest, RequestOptions options, Handler> handler) {
delegate.cleanupRepositoryAsync(cleanupRepositoryRequest, options, handler);
}
public Single rxCleanupRepositoryAsync(CleanupRepositoryRequest cleanupRepositoryRequest, RequestOptions options) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
cleanupRepositoryAsync(cleanupRepositoryRequest, options, handler);
});
}
public void createAsync(CreateSnapshotRequest createSnapshotRequest, RequestOptions options, Handler> handler) {
delegate.createAsync(createSnapshotRequest, options, handler);
}
public Single rxCreateAsync(CreateSnapshotRequest createSnapshotRequest, RequestOptions options) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
createAsync(createSnapshotRequest, options, handler);
});
}
public void getAsync(GetSnapshotsRequest getSnapshotsRequest, RequestOptions options, Handler> handler) {
delegate.getAsync(getSnapshotsRequest, options, handler);
}
public Single rxGetAsync(GetSnapshotsRequest getSnapshotsRequest, RequestOptions options) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
getAsync(getSnapshotsRequest, options, handler);
});
}
public void statusAsync(SnapshotsStatusRequest snapshotsStatusRequest, RequestOptions options, Handler> handler) {
delegate.statusAsync(snapshotsStatusRequest, options, handler);
}
public Single rxStatusAsync(SnapshotsStatusRequest snapshotsStatusRequest, RequestOptions options) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
statusAsync(snapshotsStatusRequest, options, handler);
});
}
public void restoreAsync(RestoreSnapshotRequest restoreSnapshotRequest, RequestOptions options, Handler> handler) {
delegate.restoreAsync(restoreSnapshotRequest, options, handler);
}
public Single rxRestoreAsync(RestoreSnapshotRequest restoreSnapshotRequest, RequestOptions options) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
restoreAsync(restoreSnapshotRequest, options, handler);
});
}
public void deleteAsync(DeleteSnapshotRequest deleteSnapshotRequest, RequestOptions options, Handler> handler) {
delegate.deleteAsync(deleteSnapshotRequest, options, handler);
}
public Single rxDeleteAsync(DeleteSnapshotRequest deleteSnapshotRequest, RequestOptions options) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
deleteAsync(deleteSnapshotRequest, options, handler);
});
}
public static SnapshotClient newInstance(io.reactiverse.elasticsearch.client.SnapshotClient arg) {
return arg != null ? new SnapshotClient(arg) : null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy