io.etcd.jetcd.api.MaintenanceGrpc Maven / Gradle / Ivy
The newest version!
package io.etcd.jetcd.api;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.68.1)",
comments = "Source: rpc.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class MaintenanceGrpc {
private MaintenanceGrpc() {}
public static final java.lang.String SERVICE_NAME = "etcdserverpb.Maintenance";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getAlarmMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Alarm",
requestType = io.etcd.jetcd.api.AlarmRequest.class,
responseType = io.etcd.jetcd.api.AlarmResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getAlarmMethod() {
io.grpc.MethodDescriptor getAlarmMethod;
if ((getAlarmMethod = MaintenanceGrpc.getAlarmMethod) == null) {
synchronized (MaintenanceGrpc.class) {
if ((getAlarmMethod = MaintenanceGrpc.getAlarmMethod) == null) {
MaintenanceGrpc.getAlarmMethod = getAlarmMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Alarm"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.AlarmRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.AlarmResponse.getDefaultInstance()))
.setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Alarm"))
.build();
}
}
}
return getAlarmMethod;
}
private static volatile io.grpc.MethodDescriptor getStatusMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Status",
requestType = io.etcd.jetcd.api.StatusRequest.class,
responseType = io.etcd.jetcd.api.StatusResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getStatusMethod() {
io.grpc.MethodDescriptor getStatusMethod;
if ((getStatusMethod = MaintenanceGrpc.getStatusMethod) == null) {
synchronized (MaintenanceGrpc.class) {
if ((getStatusMethod = MaintenanceGrpc.getStatusMethod) == null) {
MaintenanceGrpc.getStatusMethod = getStatusMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Status"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.StatusRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.StatusResponse.getDefaultInstance()))
.setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Status"))
.build();
}
}
}
return getStatusMethod;
}
private static volatile io.grpc.MethodDescriptor getDefragmentMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Defragment",
requestType = io.etcd.jetcd.api.DefragmentRequest.class,
responseType = io.etcd.jetcd.api.DefragmentResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getDefragmentMethod() {
io.grpc.MethodDescriptor getDefragmentMethod;
if ((getDefragmentMethod = MaintenanceGrpc.getDefragmentMethod) == null) {
synchronized (MaintenanceGrpc.class) {
if ((getDefragmentMethod = MaintenanceGrpc.getDefragmentMethod) == null) {
MaintenanceGrpc.getDefragmentMethod = getDefragmentMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Defragment"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.DefragmentRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.DefragmentResponse.getDefaultInstance()))
.setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Defragment"))
.build();
}
}
}
return getDefragmentMethod;
}
private static volatile io.grpc.MethodDescriptor getHashMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Hash",
requestType = io.etcd.jetcd.api.HashRequest.class,
responseType = io.etcd.jetcd.api.HashResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getHashMethod() {
io.grpc.MethodDescriptor getHashMethod;
if ((getHashMethod = MaintenanceGrpc.getHashMethod) == null) {
synchronized (MaintenanceGrpc.class) {
if ((getHashMethod = MaintenanceGrpc.getHashMethod) == null) {
MaintenanceGrpc.getHashMethod = getHashMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Hash"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.HashRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.HashResponse.getDefaultInstance()))
.setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Hash"))
.build();
}
}
}
return getHashMethod;
}
private static volatile io.grpc.MethodDescriptor getHashKVMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "HashKV",
requestType = io.etcd.jetcd.api.HashKVRequest.class,
responseType = io.etcd.jetcd.api.HashKVResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getHashKVMethod() {
io.grpc.MethodDescriptor getHashKVMethod;
if ((getHashKVMethod = MaintenanceGrpc.getHashKVMethod) == null) {
synchronized (MaintenanceGrpc.class) {
if ((getHashKVMethod = MaintenanceGrpc.getHashKVMethod) == null) {
MaintenanceGrpc.getHashKVMethod = getHashKVMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "HashKV"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.HashKVRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.HashKVResponse.getDefaultInstance()))
.setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("HashKV"))
.build();
}
}
}
return getHashKVMethod;
}
private static volatile io.grpc.MethodDescriptor getSnapshotMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Snapshot",
requestType = io.etcd.jetcd.api.SnapshotRequest.class,
responseType = io.etcd.jetcd.api.SnapshotResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getSnapshotMethod() {
io.grpc.MethodDescriptor getSnapshotMethod;
if ((getSnapshotMethod = MaintenanceGrpc.getSnapshotMethod) == null) {
synchronized (MaintenanceGrpc.class) {
if ((getSnapshotMethod = MaintenanceGrpc.getSnapshotMethod) == null) {
MaintenanceGrpc.getSnapshotMethod = getSnapshotMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Snapshot"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.SnapshotRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.SnapshotResponse.getDefaultInstance()))
.setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Snapshot"))
.build();
}
}
}
return getSnapshotMethod;
}
private static volatile io.grpc.MethodDescriptor getMoveLeaderMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "MoveLeader",
requestType = io.etcd.jetcd.api.MoveLeaderRequest.class,
responseType = io.etcd.jetcd.api.MoveLeaderResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getMoveLeaderMethod() {
io.grpc.MethodDescriptor getMoveLeaderMethod;
if ((getMoveLeaderMethod = MaintenanceGrpc.getMoveLeaderMethod) == null) {
synchronized (MaintenanceGrpc.class) {
if ((getMoveLeaderMethod = MaintenanceGrpc.getMoveLeaderMethod) == null) {
MaintenanceGrpc.getMoveLeaderMethod = getMoveLeaderMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "MoveLeader"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.MoveLeaderRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.etcd.jetcd.api.MoveLeaderResponse.getDefaultInstance()))
.setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("MoveLeader"))
.build();
}
}
}
return getMoveLeaderMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static MaintenanceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MaintenanceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MaintenanceStub(channel, callOptions);
}
};
return MaintenanceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static MaintenanceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MaintenanceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MaintenanceBlockingStub(channel, callOptions);
}
};
return MaintenanceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static MaintenanceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MaintenanceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MaintenanceFutureStub(channel, callOptions);
}
};
return MaintenanceFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*
* Alarm activates, deactivates, and queries alarms regarding cluster health.
*
*/
default void alarm(io.etcd.jetcd.api.AlarmRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAlarmMethod(), responseObserver);
}
/**
*
* Status gets the status of the member.
*
*/
default void status(io.etcd.jetcd.api.StatusRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStatusMethod(), responseObserver);
}
/**
*
* Defragment defragments a member's backend database to recover storage space.
*
*/
default void defragment(io.etcd.jetcd.api.DefragmentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDefragmentMethod(), responseObserver);
}
/**
*
* 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.
*
*/
default void hash(io.etcd.jetcd.api.HashRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getHashMethod(), responseObserver);
}
/**
*
* HashKV computes the hash of all MVCC keys up to a given revision.
*
*/
default void hashKV(io.etcd.jetcd.api.HashKVRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getHashKVMethod(), responseObserver);
}
/**
*
* Snapshot sends a snapshot of the entire backend from a member over a stream to a client.
*
*/
default void snapshot(io.etcd.jetcd.api.SnapshotRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSnapshotMethod(), responseObserver);
}
/**
*
* MoveLeader requests current leader node to transfer its leadership to transferee.
*
*/
default void moveLeader(io.etcd.jetcd.api.MoveLeaderRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMoveLeaderMethod(), 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);
}
/**
*
* Alarm activates, deactivates, and queries alarms regarding cluster health.
*
*/
public void alarm(io.etcd.jetcd.api.AlarmRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getAlarmMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Status gets the status of the member.
*
*/
public void status(io.etcd.jetcd.api.StatusRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getStatusMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Defragment defragments a member's backend database to recover storage space.
*
*/
public void defragment(io.etcd.jetcd.api.DefragmentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDefragmentMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* 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 void hash(io.etcd.jetcd.api.HashRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getHashMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* HashKV computes the hash of all MVCC keys up to a given revision.
*
*/
public void hashKV(io.etcd.jetcd.api.HashKVRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getHashKVMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Snapshot sends a snapshot of the entire backend from a member over a stream to a client.
*
*/
public void snapshot(io.etcd.jetcd.api.SnapshotRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getSnapshotMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* MoveLeader requests current leader node to transfer its leadership to transferee.
*
*/
public void moveLeader(io.etcd.jetcd.api.MoveLeaderRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getMoveLeaderMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service Maintenance.
*/
public static final class MaintenanceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private MaintenanceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MaintenanceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MaintenanceBlockingStub(channel, callOptions);
}
/**
*
* Alarm activates, deactivates, and queries alarms regarding cluster health.
*
*/
public io.etcd.jetcd.api.AlarmResponse alarm(io.etcd.jetcd.api.AlarmRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getAlarmMethod(), getCallOptions(), request);
}
/**
*
* Status gets the status of the member.
*
*/
public io.etcd.jetcd.api.StatusResponse status(io.etcd.jetcd.api.StatusRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getStatusMethod(), getCallOptions(), request);
}
/**
*
* Defragment defragments a member's backend database to recover storage space.
*
*/
public io.etcd.jetcd.api.DefragmentResponse defragment(io.etcd.jetcd.api.DefragmentRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDefragmentMethod(), getCallOptions(), request);
}
/**
*
* 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 io.etcd.jetcd.api.HashResponse hash(io.etcd.jetcd.api.HashRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getHashMethod(), getCallOptions(), request);
}
/**
*
* HashKV computes the hash of all MVCC keys up to a given revision.
*
*/
public io.etcd.jetcd.api.HashKVResponse hashKV(io.etcd.jetcd.api.HashKVRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getHashKVMethod(), getCallOptions(), request);
}
/**
*
* Snapshot sends a snapshot of the entire backend from a member over a stream to a client.
*
*/
public java.util.Iterator snapshot(
io.etcd.jetcd.api.SnapshotRequest request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getSnapshotMethod(), getCallOptions(), request);
}
/**
*
* MoveLeader requests current leader node to transfer its leadership to transferee.
*
*/
public io.etcd.jetcd.api.MoveLeaderResponse moveLeader(io.etcd.jetcd.api.MoveLeaderRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getMoveLeaderMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service Maintenance.
*/
public static final class MaintenanceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private MaintenanceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MaintenanceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MaintenanceFutureStub(channel, callOptions);
}
/**
*
* Alarm activates, deactivates, and queries alarms regarding cluster health.
*
*/
public com.google.common.util.concurrent.ListenableFuture alarm(
io.etcd.jetcd.api.AlarmRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getAlarmMethod(), getCallOptions()), request);
}
/**
*
* Status gets the status of the member.
*
*/
public com.google.common.util.concurrent.ListenableFuture status(
io.etcd.jetcd.api.StatusRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getStatusMethod(), getCallOptions()), request);
}
/**
*
* Defragment defragments a member's backend database to recover storage space.
*
*/
public com.google.common.util.concurrent.ListenableFuture defragment(
io.etcd.jetcd.api.DefragmentRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDefragmentMethod(), getCallOptions()), request);
}
/**
*
* 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.etcd.jetcd.api.HashRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getHashMethod(), getCallOptions()), request);
}
/**
*
* HashKV computes the hash of all MVCC keys up to a given revision.
*
*/
public com.google.common.util.concurrent.ListenableFuture hashKV(
io.etcd.jetcd.api.HashKVRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getHashKVMethod(), getCallOptions()), request);
}
/**
*
* MoveLeader requests current leader node to transfer its leadership to transferee.
*
*/
public com.google.common.util.concurrent.ListenableFuture moveLeader(
io.etcd.jetcd.api.MoveLeaderRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getMoveLeaderMethod(), 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_HASH_KV = 4;
private static final int METHODID_SNAPSHOT = 5;
private static final int METHODID_MOVE_LEADER = 6;
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.etcd.jetcd.api.AlarmRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_STATUS:
serviceImpl.status((io.etcd.jetcd.api.StatusRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DEFRAGMENT:
serviceImpl.defragment((io.etcd.jetcd.api.DefragmentRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_HASH:
serviceImpl.hash((io.etcd.jetcd.api.HashRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_HASH_KV:
serviceImpl.hashKV((io.etcd.jetcd.api.HashKVRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_SNAPSHOT:
serviceImpl.snapshot((io.etcd.jetcd.api.SnapshotRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_MOVE_LEADER:
serviceImpl.moveLeader((io.etcd.jetcd.api.MoveLeaderRequest) 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.etcd.jetcd.api.AlarmRequest,
io.etcd.jetcd.api.AlarmResponse>(
service, METHODID_ALARM)))
.addMethod(
getStatusMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.StatusRequest,
io.etcd.jetcd.api.StatusResponse>(
service, METHODID_STATUS)))
.addMethod(
getDefragmentMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.DefragmentRequest,
io.etcd.jetcd.api.DefragmentResponse>(
service, METHODID_DEFRAGMENT)))
.addMethod(
getHashMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.HashRequest,
io.etcd.jetcd.api.HashResponse>(
service, METHODID_HASH)))
.addMethod(
getHashKVMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.HashKVRequest,
io.etcd.jetcd.api.HashKVResponse>(
service, METHODID_HASH_KV)))
.addMethod(
getSnapshotMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
io.etcd.jetcd.api.SnapshotRequest,
io.etcd.jetcd.api.SnapshotResponse>(
service, METHODID_SNAPSHOT)))
.addMethod(
getMoveLeaderMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.MoveLeaderRequest,
io.etcd.jetcd.api.MoveLeaderResponse>(
service, METHODID_MOVE_LEADER)))
.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.etcd.jetcd.api.JetcdProto.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(getHashKVMethod())
.addMethod(getSnapshotMethod())
.addMethod(getMoveLeaderMethod())
.build();
}
}
}
return result;
}
}