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(io.etcd.jetcd.api.CompactionRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCompactMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getRangeMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.RangeRequest,
io.etcd.jetcd.api.RangeResponse>(
this, METHODID_RANGE)))
.addMethod(
getPutMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.PutRequest,
io.etcd.jetcd.api.PutResponse>(
this, METHODID_PUT)))
.addMethod(
getDeleteRangeMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.DeleteRangeRequest,
io.etcd.jetcd.api.DeleteRangeResponse>(
this, METHODID_DELETE_RANGE)))
.addMethod(
getTxnMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.TxnRequest,
io.etcd.jetcd.api.TxnResponse>(
this, METHODID_TXN)))
.addMethod(
getCompactMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.CompactionRequest,
io.etcd.jetcd.api.CompactionResponse>(
this, METHODID_COMPACT)))
.build();
}
}
/**
*/
public static final class KVStub extends io.grpc.stub.AbstractAsyncStub {
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.
*
*/
public io.etcd.jetcd.api.CompactionResponse compact(io.etcd.jetcd.api.CompactionRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCompactMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class KVFutureStub extends io.grpc.stub.AbstractFutureStub {
private KVFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected KVFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new KVFutureStub(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.
*
*/
public com.google.common.util.concurrent.ListenableFuture compact(
io.etcd.jetcd.api.CompactionRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCompactMethod(), 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((io.etcd.jetcd.api.RangeRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_PUT:
serviceImpl.put((io.etcd.jetcd.api.PutRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DELETE_RANGE:
serviceImpl.deleteRange((io.etcd.jetcd.api.DeleteRangeRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_TXN:
serviceImpl.txn((io.etcd.jetcd.api.TxnRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_COMPACT:
serviceImpl.compact((io.etcd.jetcd.api.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 io.etcd.jetcd.api.JetcdProto.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(getRangeMethod())
.addMethod(getPutMethod())
.addMethod(getDeleteRangeMethod())
.addMethod(getTxnMethod())
.addMethod(getCompactMethod())
.build();
}
}
}
return result;
}
}