alluxio.shaded.client.io.etcd.jetcd.api.VertxKVGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alluxio-shaded-hadoop3-client Show documentation
Show all versions of alluxio-shaded-hadoop3-client Show documentation
Shaded Alluxio Client Module for hadoop 3
package alluxio.shaded.client.io.etcd.jetcd.api;
import static alluxio.shaded.client.io.etcd.jetcd.api.KVGrpc.getServiceDescriptor;
import static alluxio.shaded.client.io.grpc.stub.ServerCalls.asyncUnaryCall;
import static alluxio.shaded.client.io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static alluxio.shaded.client.io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static alluxio.shaded.client.io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
@alluxio.shaded.client.javax.annotation.Generated(
value = "by VertxGrpc generator",
alluxio.shaded.client.com.ents = "Source: rpc.proto")
public final class VertxKVGrpc {
private VertxKVGrpc() {}
public static KVVertxStub newVertxStub(alluxio.shaded.client.io.grpc.Channel channel) {
return new KVVertxStub(channel);
}
public static final class KVVertxStub extends alluxio.shaded.client.io.grpc.stub.AbstractStub {
private final alluxio.shaded.client.io.vertx.core.impl.ContextInternal ctx;
private KVGrpc.KVStub delegateStub;
private KVVertxStub(alluxio.shaded.client.io.grpc.Channel channel) {
super(channel);
delegateStub = KVGrpc.newStub(channel);
this.ctx = (alluxio.shaded.client.io.vertx.core.impl.ContextInternal) alluxio.shaded.client.io.vertx.core.Vertx.currentContext();
}
private KVVertxStub(alluxio.shaded.client.io.grpc.Channel channel, alluxio.shaded.client.io.grpc.CallOptions callOptions) {
super(channel, callOptions);
delegateStub = KVGrpc.newStub(channel).build(channel, callOptions);
this.ctx = (alluxio.shaded.client.io.vertx.core.impl.ContextInternal) alluxio.shaded.client.io.vertx.core.Vertx.currentContext();
}
@Override
protected KVVertxStub build(alluxio.shaded.client.io.grpc.Channel channel, alluxio.shaded.client.io.grpc.CallOptions callOptions) {
return new KVVertxStub(channel, callOptions);
}
/**
*
* Range gets the keys in the range from the key-value store.
*
*/
public alluxio.shaded.client.io.vertx.core.Future range(alluxio.shaded.client.io.etcd.jetcd.api.RangeRequest request) {
return alluxio.shaded.client.io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::range);
}
/**
*
* Put puts the given key into the key-value store.
* A put request increments the revision of the key-value store
* and generates one event in the event history.
*
*/
public alluxio.shaded.client.io.vertx.core.Future put(alluxio.shaded.client.io.etcd.jetcd.api.PutRequest request) {
return alluxio.shaded.client.io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::put);
}
/**
*
* DeleteRange deletes the given range from the key-value store.
* A delete request increments the revision of the key-value store
* and generates a delete event in the event history for every deleted key.
*
*/
public alluxio.shaded.client.io.vertx.core.Future deleteRange(alluxio.shaded.client.io.etcd.jetcd.api.DeleteRangeRequest request) {
return alluxio.shaded.client.io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::deleteRange);
}
/**
*
* Txn processes multiple requests in a single transaction.
* A txn request increments the revision of the key-value store
* and generates events with the same revision for every alluxio.shaded.client.com.leted request.
* It is not allowed to modify the same key several times within one txn.
*
*/
public alluxio.shaded.client.io.vertx.core.Future txn(alluxio.shaded.client.io.etcd.jetcd.api.TxnRequest request) {
return alluxio.shaded.client.io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::txn);
}
/**
*
* Compact alluxio.shaded.client.com.acts the event history in the etcd key-value store. The key-value
* store should be periodically alluxio.shaded.client.com.acted or the event history will continue to grow
* indefinitely.
*
*/
public alluxio.shaded.client.io.vertx.core.Future alluxio.shaded.client.com.act(alluxio.shaded.client.io.etcd.jetcd.api.CompactionRequest request) {
return alluxio.shaded.client.io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::alluxio.shaded.client.com.act);
}
}
public static abstract class KVVertxImplBase implements alluxio.shaded.client.io.grpc.BindableService {
private String alluxio.shaded.client.com.ression;
/**
* Set whether the server will try to use a alluxio.shaded.client.com.ressed response.
*
* @param alluxio.shaded.client.com.ression the alluxio.shaded.client.com.ression, e.g {@code gzip}
*/
public KVVertxImplBase withCompression(String alluxio.shaded.client.com.ression) {
this.alluxio.shaded.client.com.ression = alluxio.shaded.client.com.ression;
return this;
}
/**
*
* Range gets the keys in the range from the key-value store.
*
*/
public alluxio.shaded.client.io.vertx.core.Future range(alluxio.shaded.client.io.etcd.jetcd.api.RangeRequest request) {
throw new alluxio.shaded.client.io.grpc.StatusRuntimeException(alluxio.shaded.client.io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* Put puts the given key into the key-value store.
* A put request increments the revision of the key-value store
* and generates one event in the event history.
*
*/
public alluxio.shaded.client.io.vertx.core.Future put(alluxio.shaded.client.io.etcd.jetcd.api.PutRequest request) {
throw new alluxio.shaded.client.io.grpc.StatusRuntimeException(alluxio.shaded.client.io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* DeleteRange deletes the given range from the key-value store.
* A delete request increments the revision of the key-value store
* and generates a delete event in the event history for every deleted key.
*
*/
public alluxio.shaded.client.io.vertx.core.Future deleteRange(alluxio.shaded.client.io.etcd.jetcd.api.DeleteRangeRequest request) {
throw new alluxio.shaded.client.io.grpc.StatusRuntimeException(alluxio.shaded.client.io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* Txn processes multiple requests in a single transaction.
* A txn request increments the revision of the key-value store
* and generates events with the same revision for every alluxio.shaded.client.com.leted request.
* It is not allowed to modify the same key several times within one txn.
*
*/
public alluxio.shaded.client.io.vertx.core.Future txn(alluxio.shaded.client.io.etcd.jetcd.api.TxnRequest request) {
throw new alluxio.shaded.client.io.grpc.StatusRuntimeException(alluxio.shaded.client.io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* Compact alluxio.shaded.client.com.acts the event history in the etcd key-value store. The key-value
* store should be periodically alluxio.shaded.client.com.acted or the event history will continue to grow
* indefinitely.
*
*/
public alluxio.shaded.client.io.vertx.core.Future alluxio.shaded.client.com.act(alluxio.shaded.client.io.etcd.jetcd.api.CompactionRequest request) {
throw new alluxio.shaded.client.io.grpc.StatusRuntimeException(alluxio.shaded.client.io.grpc.Status.UNIMPLEMENTED);
}
@java.lang.Override public final alluxio.shaded.client.io.grpc.ServerServiceDefinition bindService() {
return alluxio.shaded.client.io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
alluxio.shaded.client.io.etcd.jetcd.api.KVGrpc.getRangeMethod(),
asyncUnaryCall(
new MethodHandlers<
alluxio.shaded.client.io.etcd.jetcd.api.RangeRequest,
alluxio.shaded.client.io.etcd.jetcd.api.RangeResponse>(
this, METHODID_RANGE, alluxio.shaded.client.com.ression)))
.addMethod(
alluxio.shaded.client.io.etcd.jetcd.api.KVGrpc.getPutMethod(),
asyncUnaryCall(
new MethodHandlers<
alluxio.shaded.client.io.etcd.jetcd.api.PutRequest,
alluxio.shaded.client.io.etcd.jetcd.api.PutResponse>(
this, METHODID_PUT, alluxio.shaded.client.com.ression)))
.addMethod(
alluxio.shaded.client.io.etcd.jetcd.api.KVGrpc.getDeleteRangeMethod(),
asyncUnaryCall(
new MethodHandlers<
alluxio.shaded.client.io.etcd.jetcd.api.DeleteRangeRequest,
alluxio.shaded.client.io.etcd.jetcd.api.DeleteRangeResponse>(
this, METHODID_DELETE_RANGE, alluxio.shaded.client.com.ression)))
.addMethod(
alluxio.shaded.client.io.etcd.jetcd.api.KVGrpc.getTxnMethod(),
asyncUnaryCall(
new MethodHandlers<
alluxio.shaded.client.io.etcd.jetcd.api.TxnRequest,
alluxio.shaded.client.io.etcd.jetcd.api.TxnResponse>(
this, METHODID_TXN, alluxio.shaded.client.com.ression)))
.addMethod(
alluxio.shaded.client.io.etcd.jetcd.api.KVGrpc.getCompactMethod(),
asyncUnaryCall(
new MethodHandlers<
alluxio.shaded.client.io.etcd.jetcd.api.CompactionRequest,
alluxio.shaded.client.io.etcd.jetcd.api.CompactionResponse>(
this, METHODID_COMPACT, alluxio.shaded.client.com.ression)))
.build();
}
}
private static final int METHODID_RANGE = 0;
private static final int METHODID_PUT = 1;
private static final int METHODID_DELETE_RANGE = 2;
private static final int METHODID_TXN = 3;
private static final int METHODID_COMPACT = 4;
private static final class MethodHandlers implements
alluxio.shaded.client.io.grpc.stub.ServerCalls.UnaryMethod,
alluxio.shaded.client.io.grpc.stub.ServerCalls.ServerStreamingMethod,
alluxio.shaded.client.io.grpc.stub.ServerCalls.ClientStreamingMethod,
alluxio.shaded.client.io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final KVVertxImplBase serviceImpl;
private final int methodId;
private final String alluxio.shaded.client.com.ression;
MethodHandlers(KVVertxImplBase serviceImpl, int methodId, String alluxio.shaded.client.com.ression) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
this.alluxio.shaded.client.com.ression = alluxio.shaded.client.com.ression;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, alluxio.shaded.client.io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_RANGE:
alluxio.shaded.client.io.vertx.grpc.stub.ServerCalls.oneToOne(
(alluxio.shaded.client.io.etcd.jetcd.api.RangeRequest) request,
(alluxio.shaded.client.io.grpc.stub.StreamObserver) responseObserver,
alluxio.shaded.client.com.ression,
serviceImpl::range);
break;
case METHODID_PUT:
alluxio.shaded.client.io.vertx.grpc.stub.ServerCalls.oneToOne(
(alluxio.shaded.client.io.etcd.jetcd.api.PutRequest) request,
(alluxio.shaded.client.io.grpc.stub.StreamObserver) responseObserver,
alluxio.shaded.client.com.ression,
serviceImpl::put);
break;
case METHODID_DELETE_RANGE:
alluxio.shaded.client.io.vertx.grpc.stub.ServerCalls.oneToOne(
(alluxio.shaded.client.io.etcd.jetcd.api.DeleteRangeRequest) request,
(alluxio.shaded.client.io.grpc.stub.StreamObserver) responseObserver,
alluxio.shaded.client.com.ression,
serviceImpl::deleteRange);
break;
case METHODID_TXN:
alluxio.shaded.client.io.vertx.grpc.stub.ServerCalls.oneToOne(
(alluxio.shaded.client.io.etcd.jetcd.api.TxnRequest) request,
(alluxio.shaded.client.io.grpc.stub.StreamObserver) responseObserver,
alluxio.shaded.client.com.ression,
serviceImpl::txn);
break;
case METHODID_COMPACT:
alluxio.shaded.client.io.vertx.grpc.stub.ServerCalls.oneToOne(
(alluxio.shaded.client.io.etcd.jetcd.api.CompactionRequest) request,
(alluxio.shaded.client.io.grpc.stub.StreamObserver) responseObserver,
alluxio.shaded.client.com.ression,
serviceImpl::alluxio.shaded.client.com.act);
break;
default:
throw new java.lang.AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public alluxio.shaded.client.io.grpc.stub.StreamObserver invoke(alluxio.shaded.client.io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new java.lang.AssertionError();
}
}
}
}