com.ibm.etcd.api.MaintenanceGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of etcd-java Show documentation
Show all versions of etcd-java Show documentation
etcd3 java client and utilities
package com.ibm.etcd.api;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.12.0)",
comments = "Source: rpc.proto")
public final class MaintenanceGrpc {
private MaintenanceGrpc() {}
public static final String SERVICE_NAME = "etcdserverpb.Maintenance";
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getAlarmMethod()} instead.
public static final io.grpc.MethodDescriptor METHOD_ALARM = getAlarmMethodHelper();
private static volatile io.grpc.MethodDescriptor getAlarmMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor getAlarmMethod() {
return getAlarmMethodHelper();
}
private static io.grpc.MethodDescriptor getAlarmMethodHelper() {
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(
"etcdserverpb.Maintenance", "Alarm"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.AlarmRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.AlarmResponse.getDefaultInstance()))
.setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Alarm"))
.build();
}
}
}
return getAlarmMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getStatusMethod()} instead.
public static final io.grpc.MethodDescriptor METHOD_STATUS = getStatusMethodHelper();
private static volatile io.grpc.MethodDescriptor getStatusMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor getStatusMethod() {
return getStatusMethodHelper();
}
private static io.grpc.MethodDescriptor getStatusMethodHelper() {
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(
"etcdserverpb.Maintenance", "Status"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.StatusRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.StatusResponse.getDefaultInstance()))
.setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Status"))
.build();
}
}
}
return getStatusMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getDefragmentMethod()} instead.
public static final io.grpc.MethodDescriptor METHOD_DEFRAGMENT = getDefragmentMethodHelper();
private static volatile io.grpc.MethodDescriptor getDefragmentMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor getDefragmentMethod() {
return getDefragmentMethodHelper();
}
private static io.grpc.MethodDescriptor getDefragmentMethodHelper() {
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(
"etcdserverpb.Maintenance", "Defragment"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.DefragmentRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.DefragmentResponse.getDefaultInstance()))
.setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Defragment"))
.build();
}
}
}
return getDefragmentMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getHashMethod()} instead.
public static final io.grpc.MethodDescriptor METHOD_HASH = getHashMethodHelper();
private static volatile io.grpc.MethodDescriptor getHashMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor getHashMethod() {
return getHashMethodHelper();
}
private static io.grpc.MethodDescriptor getHashMethodHelper() {
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(
"etcdserverpb.Maintenance", "Hash"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.HashRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.HashResponse.getDefaultInstance()))
.setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Hash"))
.build();
}
}
}
return getHashMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getHashKVMethod()} instead.
public static final io.grpc.MethodDescriptor METHOD_HASH_KV = getHashKVMethodHelper();
private static volatile io.grpc.MethodDescriptor getHashKVMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor getHashKVMethod() {
return getHashKVMethodHelper();
}
private static io.grpc.MethodDescriptor getHashKVMethodHelper() {
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(
"etcdserverpb.Maintenance", "HashKV"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.HashKVRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.HashKVResponse.getDefaultInstance()))
.setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("HashKV"))
.build();
}
}
}
return getHashKVMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getSnapshotMethod()} instead.
public static final io.grpc.MethodDescriptor METHOD_SNAPSHOT = getSnapshotMethodHelper();
private static volatile io.grpc.MethodDescriptor getSnapshotMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor getSnapshotMethod() {
return getSnapshotMethodHelper();
}
private static io.grpc.MethodDescriptor getSnapshotMethodHelper() {
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(
"etcdserverpb.Maintenance", "Snapshot"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.SnapshotRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.SnapshotResponse.getDefaultInstance()))
.setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Snapshot"))
.build();
}
}
}
return getSnapshotMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getMoveLeaderMethod()} instead.
public static final io.grpc.MethodDescriptor METHOD_MOVE_LEADER = getMoveLeaderMethodHelper();
private static volatile io.grpc.MethodDescriptor getMoveLeaderMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor getMoveLeaderMethod() {
return getMoveLeaderMethodHelper();
}
private static io.grpc.MethodDescriptor getMoveLeaderMethodHelper() {
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(
"etcdserverpb.Maintenance", "MoveLeader"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.api.MoveLeaderRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.ibm.etcd.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) {
return new MaintenanceStub(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) {
return new MaintenanceBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static MaintenanceFutureStub newFutureStub(
io.grpc.Channel channel) {
return new MaintenanceFutureStub(channel);
}
/**
*/
public static abstract class MaintenanceImplBase implements io.grpc.BindableService {
/**
*
* Alarm activates, deactivates, and queries alarms regarding cluster health.
*
*/
public void alarm(com.ibm.etcd.api.AlarmRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getAlarmMethodHelper(), responseObserver);
}
/**
*
* Status gets the status of the member.
*
*/
public void status(com.ibm.etcd.api.StatusRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getStatusMethodHelper(), responseObserver);
}
/**
*
* Defragment defragments a member's backend database to recover storage space.
*
*/
public void defragment(com.ibm.etcd.api.DefragmentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getDefragmentMethodHelper(), responseObserver);
}
/**
*
* Hash computes the hash of the KV's backend.
* This is designed for testing; do not use this in production when there
* are ongoing transactions.
*
*/
public void hash(com.ibm.etcd.api.HashRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getHashMethodHelper(), responseObserver);
}
/**
*
* HashKV computes the hash of all MVCC keys up to a given revision.
*
*/
public void hashKV(com.ibm.etcd.api.HashKVRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getHashKVMethodHelper(), responseObserver);
}
/**
*
* Snapshot sends a snapshot of the entire backend from a member over a stream to a client.
*
*/
public void snapshot(com.ibm.etcd.api.SnapshotRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getSnapshotMethodHelper(), responseObserver);
}
/**
*
* MoveLeader requests current leader node to transfer its leadership to transferee.
*
*/
public void moveLeader(com.ibm.etcd.api.MoveLeaderRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getMoveLeaderMethodHelper(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getAlarmMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.ibm.etcd.api.AlarmRequest,
com.ibm.etcd.api.AlarmResponse>(
this, METHODID_ALARM)))
.addMethod(
getStatusMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.ibm.etcd.api.StatusRequest,
com.ibm.etcd.api.StatusResponse>(
this, METHODID_STATUS)))
.addMethod(
getDefragmentMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.ibm.etcd.api.DefragmentRequest,
com.ibm.etcd.api.DefragmentResponse>(
this, METHODID_DEFRAGMENT)))
.addMethod(
getHashMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.ibm.etcd.api.HashRequest,
com.ibm.etcd.api.HashResponse>(
this, METHODID_HASH)))
.addMethod(
getHashKVMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.ibm.etcd.api.HashKVRequest,
com.ibm.etcd.api.HashKVResponse>(
this, METHODID_HASH_KV)))
.addMethod(
getSnapshotMethodHelper(),
asyncServerStreamingCall(
new MethodHandlers<
com.ibm.etcd.api.SnapshotRequest,
com.ibm.etcd.api.SnapshotResponse>(
this, METHODID_SNAPSHOT)))
.addMethod(
getMoveLeaderMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.ibm.etcd.api.MoveLeaderRequest,
com.ibm.etcd.api.MoveLeaderResponse>(
this, METHODID_MOVE_LEADER)))
.build();
}
}
/**
*/
public static final class MaintenanceStub extends io.grpc.stub.AbstractStub {
private MaintenanceStub(io.grpc.Channel channel) {
super(channel);
}
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(com.ibm.etcd.api.AlarmRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getAlarmMethodHelper(), getCallOptions()), request, responseObserver);
}
/**
*
* Status gets the status of the member.
*
*/
public void status(com.ibm.etcd.api.StatusRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getStatusMethodHelper(), getCallOptions()), request, responseObserver);
}
/**
*
* Defragment defragments a member's backend database to recover storage space.
*
*/
public void defragment(com.ibm.etcd.api.DefragmentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getDefragmentMethodHelper(), getCallOptions()), request, responseObserver);
}
/**
*
* Hash computes the hash of the KV's backend.
* This is designed for testing; do not use this in production when there
* are ongoing transactions.
*
*/
public void hash(com.ibm.etcd.api.HashRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getHashMethodHelper(), getCallOptions()), request, responseObserver);
}
/**
*
* HashKV computes the hash of all MVCC keys up to a given revision.
*
*/
public void hashKV(com.ibm.etcd.api.HashKVRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getHashKVMethodHelper(), getCallOptions()), request, responseObserver);
}
/**
*
* Snapshot sends a snapshot of the entire backend from a member over a stream to a client.
*
*/
public void snapshot(com.ibm.etcd.api.SnapshotRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncServerStreamingCall(
getChannel().newCall(getSnapshotMethodHelper(), getCallOptions()), request, responseObserver);
}
/**
*
* MoveLeader requests current leader node to transfer its leadership to transferee.
*
*/
public void moveLeader(com.ibm.etcd.api.MoveLeaderRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getMoveLeaderMethodHelper(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class MaintenanceBlockingStub extends io.grpc.stub.AbstractStub {
private MaintenanceBlockingStub(io.grpc.Channel channel) {
super(channel);
}
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 com.ibm.etcd.api.AlarmResponse alarm(com.ibm.etcd.api.AlarmRequest request) {
return blockingUnaryCall(
getChannel(), getAlarmMethodHelper(), getCallOptions(), request);
}
/**
*
* Status gets the status of the member.
*
*/
public com.ibm.etcd.api.StatusResponse status(com.ibm.etcd.api.StatusRequest request) {
return blockingUnaryCall(
getChannel(), getStatusMethodHelper(), getCallOptions(), request);
}
/**
*
* Defragment defragments a member's backend database to recover storage space.
*
*/
public com.ibm.etcd.api.DefragmentResponse defragment(com.ibm.etcd.api.DefragmentRequest request) {
return blockingUnaryCall(
getChannel(), getDefragmentMethodHelper(), getCallOptions(), request);
}
/**
*
* Hash computes the hash of the KV's backend.
* This is designed for testing; do not use this in production when there
* are ongoing transactions.
*
*/
public com.ibm.etcd.api.HashResponse hash(com.ibm.etcd.api.HashRequest request) {
return blockingUnaryCall(
getChannel(), getHashMethodHelper(), getCallOptions(), request);
}
/**
*
* HashKV computes the hash of all MVCC keys up to a given revision.
*
*/
public com.ibm.etcd.api.HashKVResponse hashKV(com.ibm.etcd.api.HashKVRequest request) {
return blockingUnaryCall(
getChannel(), getHashKVMethodHelper(), getCallOptions(), request);
}
/**
*
* Snapshot sends a snapshot of the entire backend from a member over a stream to a client.
*
*/
public java.util.Iterator snapshot(
com.ibm.etcd.api.SnapshotRequest request) {
return blockingServerStreamingCall(
getChannel(), getSnapshotMethodHelper(), getCallOptions(), request);
}
/**
*
* MoveLeader requests current leader node to transfer its leadership to transferee.
*
*/
public com.ibm.etcd.api.MoveLeaderResponse moveLeader(com.ibm.etcd.api.MoveLeaderRequest request) {
return blockingUnaryCall(
getChannel(), getMoveLeaderMethodHelper(), getCallOptions(), request);
}
}
/**
*/
public static final class MaintenanceFutureStub extends io.grpc.stub.AbstractStub {
private MaintenanceFutureStub(io.grpc.Channel channel) {
super(channel);
}
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(
com.ibm.etcd.api.AlarmRequest request) {
return futureUnaryCall(
getChannel().newCall(getAlarmMethodHelper(), getCallOptions()), request);
}
/**
*
* Status gets the status of the member.
*
*/
public com.google.common.util.concurrent.ListenableFuture status(
com.ibm.etcd.api.StatusRequest request) {
return futureUnaryCall(
getChannel().newCall(getStatusMethodHelper(), getCallOptions()), request);
}
/**
*
* Defragment defragments a member's backend database to recover storage space.
*
*/
public com.google.common.util.concurrent.ListenableFuture defragment(
com.ibm.etcd.api.DefragmentRequest request) {
return futureUnaryCall(
getChannel().newCall(getDefragmentMethodHelper(), getCallOptions()), request);
}
/**
*
* Hash computes the hash of the KV's backend.
* This is designed for testing; do not use this in production when there
* are ongoing transactions.
*
*/
public com.google.common.util.concurrent.ListenableFuture hash(
com.ibm.etcd.api.HashRequest request) {
return futureUnaryCall(
getChannel().newCall(getHashMethodHelper(), getCallOptions()), request);
}
/**
*
* HashKV computes the hash of all MVCC keys up to a given revision.
*
*/
public com.google.common.util.concurrent.ListenableFuture hashKV(
com.ibm.etcd.api.HashKVRequest request) {
return futureUnaryCall(
getChannel().newCall(getHashKVMethodHelper(), getCallOptions()), request);
}
/**
*
* MoveLeader requests current leader node to transfer its leadership to transferee.
*
*/
public com.google.common.util.concurrent.ListenableFuture moveLeader(
com.ibm.etcd.api.MoveLeaderRequest request) {
return futureUnaryCall(
getChannel().newCall(getMoveLeaderMethodHelper(), 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 MaintenanceImplBase serviceImpl;
private final int methodId;
MethodHandlers(MaintenanceImplBase 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((com.ibm.etcd.api.AlarmRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_STATUS:
serviceImpl.status((com.ibm.etcd.api.StatusRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DEFRAGMENT:
serviceImpl.defragment((com.ibm.etcd.api.DefragmentRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_HASH:
serviceImpl.hash((com.ibm.etcd.api.HashRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_HASH_KV:
serviceImpl.hashKV((com.ibm.etcd.api.HashKVRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_SNAPSHOT:
serviceImpl.snapshot((com.ibm.etcd.api.SnapshotRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_MOVE_LEADER:
serviceImpl.moveLeader((com.ibm.etcd.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();
}
}
}
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 com.ibm.etcd.api.Rpc.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 String methodName;
MaintenanceMethodDescriptorSupplier(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(getAlarmMethodHelper())
.addMethod(getStatusMethodHelper())
.addMethod(getDefragmentMethodHelper())
.addMethod(getHashMethodHelper())
.addMethod(getHashKVMethodHelper())
.addMethod(getSnapshotMethodHelper())
.addMethod(getMoveLeaderMethodHelper())
.build();
}
}
}
return result;
}
}