Please wait. This can take some minutes ...
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.
etcdserverpb.ClusterGrpc Maven / Gradle / Ivy
package etcdserverpb;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.7.0)",
comments = "Source: etcd/etcdserver/etcdserverpb/rpc.proto")
public final class ClusterGrpc {
private ClusterGrpc() {}
public static final String SERVICE_NAME = "etcdserverpb.Cluster";
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_MEMBER_ADD =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"etcdserverpb.Cluster", "MemberAdd"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
etcdserverpb.Rpc.MemberAddRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
etcdserverpb.Rpc.MemberAddResponse.getDefaultInstance()))
.setSchemaDescriptor(new ClusterMethodDescriptorSupplier("MemberAdd"))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_MEMBER_REMOVE =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"etcdserverpb.Cluster", "MemberRemove"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
etcdserverpb.Rpc.MemberRemoveRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
etcdserverpb.Rpc.MemberRemoveResponse.getDefaultInstance()))
.setSchemaDescriptor(new ClusterMethodDescriptorSupplier("MemberRemove"))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_MEMBER_UPDATE =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"etcdserverpb.Cluster", "MemberUpdate"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
etcdserverpb.Rpc.MemberUpdateRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
etcdserverpb.Rpc.MemberUpdateResponse.getDefaultInstance()))
.setSchemaDescriptor(new ClusterMethodDescriptorSupplier("MemberUpdate"))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_MEMBER_LIST =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"etcdserverpb.Cluster", "MemberList"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
etcdserverpb.Rpc.MemberListRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
etcdserverpb.Rpc.MemberListResponse.getDefaultInstance()))
.setSchemaDescriptor(new ClusterMethodDescriptorSupplier("MemberList"))
.build();
/**
* Creates a new async stub that supports all call types for the service
*/
public static ClusterStub newStub(io.grpc.Channel channel) {
return new ClusterStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ClusterBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new ClusterBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ClusterFutureStub newFutureStub(
io.grpc.Channel channel) {
return new ClusterFutureStub(channel);
}
/**
*/
public static abstract class ClusterImplBase implements io.grpc.BindableService {
/**
*
* MemberAdd adds a member into the cluster.
*
*/
public void memberAdd(etcdserverpb.Rpc.MemberAddRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_MEMBER_ADD, responseObserver);
}
/**
*
* MemberRemove removes an existing member from the cluster.
*
*/
public void memberRemove(etcdserverpb.Rpc.MemberRemoveRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_MEMBER_REMOVE, responseObserver);
}
/**
*
* MemberUpdate updates the member configuration.
*
*/
public void memberUpdate(etcdserverpb.Rpc.MemberUpdateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_MEMBER_UPDATE, responseObserver);
}
/**
*
* MemberList lists all the members in the cluster.
*
*/
public void memberList(etcdserverpb.Rpc.MemberListRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_MEMBER_LIST, responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
METHOD_MEMBER_ADD,
asyncUnaryCall(
new MethodHandlers<
etcdserverpb.Rpc.MemberAddRequest,
etcdserverpb.Rpc.MemberAddResponse>(
this, METHODID_MEMBER_ADD)))
.addMethod(
METHOD_MEMBER_REMOVE,
asyncUnaryCall(
new MethodHandlers<
etcdserverpb.Rpc.MemberRemoveRequest,
etcdserverpb.Rpc.MemberRemoveResponse>(
this, METHODID_MEMBER_REMOVE)))
.addMethod(
METHOD_MEMBER_UPDATE,
asyncUnaryCall(
new MethodHandlers<
etcdserverpb.Rpc.MemberUpdateRequest,
etcdserverpb.Rpc.MemberUpdateResponse>(
this, METHODID_MEMBER_UPDATE)))
.addMethod(
METHOD_MEMBER_LIST,
asyncUnaryCall(
new MethodHandlers<
etcdserverpb.Rpc.MemberListRequest,
etcdserverpb.Rpc.MemberListResponse>(
this, METHODID_MEMBER_LIST)))
.build();
}
}
/**
*/
public static final class ClusterStub extends io.grpc.stub.AbstractStub {
private ClusterStub(io.grpc.Channel channel) {
super(channel);
}
private ClusterStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ClusterStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new ClusterStub(channel, callOptions);
}
/**
*
* MemberAdd adds a member into the cluster.
*
*/
public void memberAdd(etcdserverpb.Rpc.MemberAddRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_MEMBER_ADD, getCallOptions()), request, responseObserver);
}
/**
*
* MemberRemove removes an existing member from the cluster.
*
*/
public void memberRemove(etcdserverpb.Rpc.MemberRemoveRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_MEMBER_REMOVE, getCallOptions()), request, responseObserver);
}
/**
*
* MemberUpdate updates the member configuration.
*
*/
public void memberUpdate(etcdserverpb.Rpc.MemberUpdateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_MEMBER_UPDATE, getCallOptions()), request, responseObserver);
}
/**
*
* MemberList lists all the members in the cluster.
*
*/
public void memberList(etcdserverpb.Rpc.MemberListRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_MEMBER_LIST, getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class ClusterBlockingStub extends io.grpc.stub.AbstractStub {
private ClusterBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private ClusterBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ClusterBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new ClusterBlockingStub(channel, callOptions);
}
/**
*
* MemberAdd adds a member into the cluster.
*
*/
public etcdserverpb.Rpc.MemberAddResponse memberAdd(etcdserverpb.Rpc.MemberAddRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_MEMBER_ADD, getCallOptions(), request);
}
/**
*
* MemberRemove removes an existing member from the cluster.
*
*/
public etcdserverpb.Rpc.MemberRemoveResponse memberRemove(etcdserverpb.Rpc.MemberRemoveRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_MEMBER_REMOVE, getCallOptions(), request);
}
/**
*
* MemberUpdate updates the member configuration.
*
*/
public etcdserverpb.Rpc.MemberUpdateResponse memberUpdate(etcdserverpb.Rpc.MemberUpdateRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_MEMBER_UPDATE, getCallOptions(), request);
}
/**
*
* MemberList lists all the members in the cluster.
*
*/
public etcdserverpb.Rpc.MemberListResponse memberList(etcdserverpb.Rpc.MemberListRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_MEMBER_LIST, getCallOptions(), request);
}
}
/**
*/
public static final class ClusterFutureStub extends io.grpc.stub.AbstractStub {
private ClusterFutureStub(io.grpc.Channel channel) {
super(channel);
}
private ClusterFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ClusterFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new ClusterFutureStub(channel, callOptions);
}
/**
*
* MemberAdd adds a member into the cluster.
*
*/
public com.google.common.util.concurrent.ListenableFuture memberAdd(
etcdserverpb.Rpc.MemberAddRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_MEMBER_ADD, getCallOptions()), request);
}
/**
*
* MemberRemove removes an existing member from the cluster.
*
*/
public com.google.common.util.concurrent.ListenableFuture memberRemove(
etcdserverpb.Rpc.MemberRemoveRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_MEMBER_REMOVE, getCallOptions()), request);
}
/**
*
* MemberUpdate updates the member configuration.
*
*/
public com.google.common.util.concurrent.ListenableFuture memberUpdate(
etcdserverpb.Rpc.MemberUpdateRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_MEMBER_UPDATE, getCallOptions()), request);
}
/**
*
* MemberList lists all the members in the cluster.
*
*/
public com.google.common.util.concurrent.ListenableFuture memberList(
etcdserverpb.Rpc.MemberListRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_MEMBER_LIST, getCallOptions()), request);
}
}
private static final int METHODID_MEMBER_ADD = 0;
private static final int METHODID_MEMBER_REMOVE = 1;
private static final int METHODID_MEMBER_UPDATE = 2;
private static final int METHODID_MEMBER_LIST = 3;
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 ClusterImplBase serviceImpl;
private final int methodId;
MethodHandlers(ClusterImplBase 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_MEMBER_ADD:
serviceImpl.memberAdd((etcdserverpb.Rpc.MemberAddRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_MEMBER_REMOVE:
serviceImpl.memberRemove((etcdserverpb.Rpc.MemberRemoveRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_MEMBER_UPDATE:
serviceImpl.memberUpdate((etcdserverpb.Rpc.MemberUpdateRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_MEMBER_LIST:
serviceImpl.memberList((etcdserverpb.Rpc.MemberListRequest) 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 ClusterBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
ClusterBaseDescriptorSupplier() {}
@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("Cluster");
}
}
private static final class ClusterFileDescriptorSupplier
extends ClusterBaseDescriptorSupplier {
ClusterFileDescriptorSupplier() {}
}
private static final class ClusterMethodDescriptorSupplier
extends ClusterBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
ClusterMethodDescriptorSupplier(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 (ClusterGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new ClusterFileDescriptorSupplier())
.addMethod(METHOD_MEMBER_ADD)
.addMethod(METHOD_MEMBER_REMOVE)
.addMethod(METHOD_MEMBER_UPDATE)
.addMethod(METHOD_MEMBER_LIST)
.build();
}
}
}
return result;
}
}