Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* 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.
*
* 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.
*
* 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 completed request.
* It is not allowed to modify the same key several times within one txn.
*
* Compact compacts the event history in the etcd key-value store. The key-value
* store should be periodically compacted or the event history will continue to grow
* indefinitely.
*
*/
public void compact(etcdserverpb.Rpc.CompactionRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_COMPACT, responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
METHOD_RANGE,
asyncUnaryCall(
new MethodHandlers<
etcdserverpb.Rpc.RangeRequest,
etcdserverpb.Rpc.RangeResponse>(
this, METHODID_RANGE)))
.addMethod(
METHOD_PUT,
asyncUnaryCall(
new MethodHandlers<
etcdserverpb.Rpc.PutRequest,
etcdserverpb.Rpc.PutResponse>(
this, METHODID_PUT)))
.addMethod(
METHOD_DELETE_RANGE,
asyncUnaryCall(
new MethodHandlers<
etcdserverpb.Rpc.DeleteRangeRequest,
etcdserverpb.Rpc.DeleteRangeResponse>(
this, METHODID_DELETE_RANGE)))
.addMethod(
METHOD_TXN,
asyncUnaryCall(
new MethodHandlers<
etcdserverpb.Rpc.TxnRequest,
etcdserverpb.Rpc.TxnResponse>(
this, METHODID_TXN)))
.addMethod(
METHOD_COMPACT,
asyncUnaryCall(
new MethodHandlers<
etcdserverpb.Rpc.CompactionRequest,
etcdserverpb.Rpc.CompactionResponse>(
this, METHODID_COMPACT)))
.build();
}
}
/**
*/
public static final class KVStub extends io.grpc.stub.AbstractStub {
private KVStub(io.grpc.Channel channel) {
super(channel);
}
private KVStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected KVStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new KVStub(channel, callOptions);
}
/**
*
* Range gets the keys in the range from the key-value store.
*
* 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.
*
* 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.
*
* 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 completed request.
* It is not allowed to modify the same key several times within one txn.
*
* Compact compacts the event history in the etcd key-value store. The key-value
* store should be periodically compacted or the event history will continue to grow
* indefinitely.
*
* 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.
*
* 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.
*
* 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 completed request.
* It is not allowed to modify the same key several times within one txn.
*
* Compact compacts the event history in the etcd key-value store. The key-value
* store should be periodically compacted or the event history will continue to grow
* indefinitely.
*
* 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.
*
* 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.
*
* 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 completed request.
* It is not allowed to modify the same key several times within one txn.
*
* Compact compacts the event history in the etcd key-value store. The key-value
* store should be periodically compacted or the event history will continue to grow
* indefinitely.
*
*/
public com.google.common.util.concurrent.ListenableFuture compact(
etcdserverpb.Rpc.CompactionRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_COMPACT, getCallOptions()), request);
}
}
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
io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final KVImplBase serviceImpl;
private final int methodId;
MethodHandlers(KVImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_RANGE:
serviceImpl.range((etcdserverpb.Rpc.RangeRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_PUT:
serviceImpl.put((etcdserverpb.Rpc.PutRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DELETE_RANGE:
serviceImpl.deleteRange((etcdserverpb.Rpc.DeleteRangeRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_TXN:
serviceImpl.txn((etcdserverpb.Rpc.TxnRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_COMPACT:
serviceImpl.compact((etcdserverpb.Rpc.CompactionRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
private static abstract class KVBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
KVBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return etcdserverpb.Rpc.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("KV");
}
}
private static final class KVFileDescriptorSupplier
extends KVBaseDescriptorSupplier {
KVFileDescriptorSupplier() {}
}
private static final class KVMethodDescriptorSupplier
extends KVBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
KVMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (KVGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new KVFileDescriptorSupplier())
.addMethod(METHOD_RANGE)
.addMethod(METHOD_PUT)
.addMethod(METHOD_DELETE_RANGE)
.addMethod(METHOD_TXN)
.addMethod(METHOD_COMPACT)
.build();
}
}
}
return result;
}
}