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.
* Hash returns the hash of the local KV state for consistency checking purpose.
* This is designed for testing; do not use this in production when there
* are ongoing transactions.
*
* Snapshot sends a snapshot of the entire backend from a member over a stream to a client.
*
*/
default void snapshot(io.helidon.config.etcd.internal.client.proto.SnapshotRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSnapshotMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service Maintenance.
*/
public static abstract class MaintenanceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return MaintenanceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service Maintenance.
*/
public static final class MaintenanceStub
extends io.grpc.stub.AbstractAsyncStub {
private MaintenanceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MaintenanceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MaintenanceStub(channel, callOptions);
}
/**
*
* Hash returns the hash of the local KV state for consistency checking purpose.
* This is designed for testing; do not use this in production when there
* are ongoing transactions.
*
* Hash returns the hash of the local KV state for consistency checking purpose.
* This is designed for testing; do not use this in production when there
* are ongoing transactions.
*
* Hash returns the hash of the local KV state for consistency checking purpose.
* This is designed for testing; do not use this in production when there
* are ongoing transactions.
*
*/
public com.google.common.util.concurrent.ListenableFuture hash(
io.helidon.config.etcd.internal.client.proto.HashRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getHashMethod(), getCallOptions()), request);
}
}
private static final int METHODID_ALARM = 0;
private static final int METHODID_STATUS = 1;
private static final int METHODID_DEFRAGMENT = 2;
private static final int METHODID_HASH = 3;
private static final int METHODID_SNAPSHOT = 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 AsyncService serviceImpl;
private final int methodId;
MethodHandlers(AsyncService 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_ALARM:
serviceImpl.alarm((io.helidon.config.etcd.internal.client.proto.AlarmRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_STATUS:
serviceImpl.status((io.helidon.config.etcd.internal.client.proto.StatusRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DEFRAGMENT:
serviceImpl.defragment((io.helidon.config.etcd.internal.client.proto.DefragmentRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_HASH:
serviceImpl.hash((io.helidon.config.etcd.internal.client.proto.HashRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_SNAPSHOT:
serviceImpl.snapshot((io.helidon.config.etcd.internal.client.proto.SnapshotRequest) 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();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getAlarmMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.helidon.config.etcd.internal.client.proto.AlarmRequest,
io.helidon.config.etcd.internal.client.proto.AlarmResponse>(
service, METHODID_ALARM)))
.addMethod(
getStatusMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.helidon.config.etcd.internal.client.proto.StatusRequest,
io.helidon.config.etcd.internal.client.proto.StatusResponse>(
service, METHODID_STATUS)))
.addMethod(
getDefragmentMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.helidon.config.etcd.internal.client.proto.DefragmentRequest,
io.helidon.config.etcd.internal.client.proto.DefragmentResponse>(
service, METHODID_DEFRAGMENT)))
.addMethod(
getHashMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.helidon.config.etcd.internal.client.proto.HashRequest,
io.helidon.config.etcd.internal.client.proto.HashResponse>(
service, METHODID_HASH)))
.addMethod(
getSnapshotMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
io.helidon.config.etcd.internal.client.proto.SnapshotRequest,
io.helidon.config.etcd.internal.client.proto.SnapshotResponse>(
service, METHODID_SNAPSHOT)))
.build();
}
private static abstract class MaintenanceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
MaintenanceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return io.helidon.config.etcd.internal.client.proto.EtcdProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Maintenance");
}
}
private static final class MaintenanceFileDescriptorSupplier
extends MaintenanceBaseDescriptorSupplier {
MaintenanceFileDescriptorSupplier() {}
}
private static final class MaintenanceMethodDescriptorSupplier
extends MaintenanceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
MaintenanceMethodDescriptorSupplier(java.lang.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 (MaintenanceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new MaintenanceFileDescriptorSupplier())
.addMethod(getAlarmMethod())
.addMethod(getStatusMethod())
.addMethod(getDefragmentMethod())
.addMethod(getHashMethod())
.addMethod(getSnapshotMethod())
.build();
}
}
}
return result;
}
}