io.helidon.config.etcd.internal.client.proto.ClusterGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of helidon-config-etcd Show documentation
Show all versions of helidon-config-etcd Show documentation
etcd config source implementation.
package io.helidon.config.etcd.internal.client.proto;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.49.2)",
comments = "Source: rpc.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ClusterGrpc {
private ClusterGrpc() {}
public static final String SERVICE_NAME = "etcdserverpb.Cluster";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getMemberAddMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "MemberAdd",
requestType = io.helidon.config.etcd.internal.client.proto.MemberAddRequest.class,
responseType = io.helidon.config.etcd.internal.client.proto.MemberAddResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getMemberAddMethod() {
io.grpc.MethodDescriptor getMemberAddMethod;
if ((getMemberAddMethod = ClusterGrpc.getMemberAddMethod) == null) {
synchronized (ClusterGrpc.class) {
if ((getMemberAddMethod = ClusterGrpc.getMemberAddMethod) == null) {
ClusterGrpc.getMemberAddMethod = getMemberAddMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "MemberAdd"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.helidon.config.etcd.internal.client.proto.MemberAddRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.helidon.config.etcd.internal.client.proto.MemberAddResponse.getDefaultInstance()))
.setSchemaDescriptor(new ClusterMethodDescriptorSupplier("MemberAdd"))
.build();
}
}
}
return getMemberAddMethod;
}
private static volatile io.grpc.MethodDescriptor getMemberRemoveMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "MemberRemove",
requestType = io.helidon.config.etcd.internal.client.proto.MemberRemoveRequest.class,
responseType = io.helidon.config.etcd.internal.client.proto.MemberRemoveResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getMemberRemoveMethod() {
io.grpc.MethodDescriptor getMemberRemoveMethod;
if ((getMemberRemoveMethod = ClusterGrpc.getMemberRemoveMethod) == null) {
synchronized (ClusterGrpc.class) {
if ((getMemberRemoveMethod = ClusterGrpc.getMemberRemoveMethod) == null) {
ClusterGrpc.getMemberRemoveMethod = getMemberRemoveMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "MemberRemove"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.helidon.config.etcd.internal.client.proto.MemberRemoveRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.helidon.config.etcd.internal.client.proto.MemberRemoveResponse.getDefaultInstance()))
.setSchemaDescriptor(new ClusterMethodDescriptorSupplier("MemberRemove"))
.build();
}
}
}
return getMemberRemoveMethod;
}
private static volatile io.grpc.MethodDescriptor getMemberUpdateMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "MemberUpdate",
requestType = io.helidon.config.etcd.internal.client.proto.MemberUpdateRequest.class,
responseType = io.helidon.config.etcd.internal.client.proto.MemberUpdateResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getMemberUpdateMethod() {
io.grpc.MethodDescriptor getMemberUpdateMethod;
if ((getMemberUpdateMethod = ClusterGrpc.getMemberUpdateMethod) == null) {
synchronized (ClusterGrpc.class) {
if ((getMemberUpdateMethod = ClusterGrpc.getMemberUpdateMethod) == null) {
ClusterGrpc.getMemberUpdateMethod = getMemberUpdateMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "MemberUpdate"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.helidon.config.etcd.internal.client.proto.MemberUpdateRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.helidon.config.etcd.internal.client.proto.MemberUpdateResponse.getDefaultInstance()))
.setSchemaDescriptor(new ClusterMethodDescriptorSupplier("MemberUpdate"))
.build();
}
}
}
return getMemberUpdateMethod;
}
private static volatile io.grpc.MethodDescriptor getMemberListMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "MemberList",
requestType = io.helidon.config.etcd.internal.client.proto.MemberListRequest.class,
responseType = io.helidon.config.etcd.internal.client.proto.MemberListResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getMemberListMethod() {
io.grpc.MethodDescriptor getMemberListMethod;
if ((getMemberListMethod = ClusterGrpc.getMemberListMethod) == null) {
synchronized (ClusterGrpc.class) {
if ((getMemberListMethod = ClusterGrpc.getMemberListMethod) == null) {
ClusterGrpc.getMemberListMethod = getMemberListMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "MemberList"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.helidon.config.etcd.internal.client.proto.MemberListRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.helidon.config.etcd.internal.client.proto.MemberListResponse.getDefaultInstance()))
.setSchemaDescriptor(new ClusterMethodDescriptorSupplier("MemberList"))
.build();
}
}
}
return getMemberListMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static ClusterStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ClusterStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClusterStub(channel, callOptions);
}
};
return ClusterStub.newStub(factory, 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) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ClusterBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClusterBlockingStub(channel, callOptions);
}
};
return ClusterBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ClusterFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ClusterFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClusterFutureStub(channel, callOptions);
}
};
return ClusterFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class ClusterImplBase implements io.grpc.BindableService {
/**
*
* MemberAdd adds a member into the cluster.
*
*/
public void memberAdd(io.helidon.config.etcd.internal.client.proto.MemberAddRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMemberAddMethod(), responseObserver);
}
/**
*
* MemberRemove removes an existing member from the cluster.
*
*/
public void memberRemove(io.helidon.config.etcd.internal.client.proto.MemberRemoveRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMemberRemoveMethod(), responseObserver);
}
/**
*
* MemberUpdate updates the member configuration.
*
*/
public void memberUpdate(io.helidon.config.etcd.internal.client.proto.MemberUpdateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMemberUpdateMethod(), responseObserver);
}
/**
*
* MemberList lists all the members in the cluster.
*
*/
public void memberList(io.helidon.config.etcd.internal.client.proto.MemberListRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMemberListMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getMemberAddMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.helidon.config.etcd.internal.client.proto.MemberAddRequest,
io.helidon.config.etcd.internal.client.proto.MemberAddResponse>(
this, METHODID_MEMBER_ADD)))
.addMethod(
getMemberRemoveMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.helidon.config.etcd.internal.client.proto.MemberRemoveRequest,
io.helidon.config.etcd.internal.client.proto.MemberRemoveResponse>(
this, METHODID_MEMBER_REMOVE)))
.addMethod(
getMemberUpdateMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.helidon.config.etcd.internal.client.proto.MemberUpdateRequest,
io.helidon.config.etcd.internal.client.proto.MemberUpdateResponse>(
this, METHODID_MEMBER_UPDATE)))
.addMethod(
getMemberListMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.helidon.config.etcd.internal.client.proto.MemberListRequest,
io.helidon.config.etcd.internal.client.proto.MemberListResponse>(
this, METHODID_MEMBER_LIST)))
.build();
}
}
/**
*/
public static final class ClusterStub extends io.grpc.stub.AbstractAsyncStub {
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(io.helidon.config.etcd.internal.client.proto.MemberAddRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getMemberAddMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* MemberRemove removes an existing member from the cluster.
*
*/
public void memberRemove(io.helidon.config.etcd.internal.client.proto.MemberRemoveRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getMemberRemoveMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* MemberUpdate updates the member configuration.
*
*/
public void memberUpdate(io.helidon.config.etcd.internal.client.proto.MemberUpdateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getMemberUpdateMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* MemberList lists all the members in the cluster.
*
*/
public void memberList(io.helidon.config.etcd.internal.client.proto.MemberListRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getMemberListMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class ClusterBlockingStub extends io.grpc.stub.AbstractBlockingStub {
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 io.helidon.config.etcd.internal.client.proto.MemberAddResponse memberAdd(io.helidon.config.etcd.internal.client.proto.MemberAddRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getMemberAddMethod(), getCallOptions(), request);
}
/**
*
* MemberRemove removes an existing member from the cluster.
*
*/
public io.helidon.config.etcd.internal.client.proto.MemberRemoveResponse memberRemove(io.helidon.config.etcd.internal.client.proto.MemberRemoveRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getMemberRemoveMethod(), getCallOptions(), request);
}
/**
*
* MemberUpdate updates the member configuration.
*
*/
public io.helidon.config.etcd.internal.client.proto.MemberUpdateResponse memberUpdate(io.helidon.config.etcd.internal.client.proto.MemberUpdateRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getMemberUpdateMethod(), getCallOptions(), request);
}
/**
*
* MemberList lists all the members in the cluster.
*
*/
public io.helidon.config.etcd.internal.client.proto.MemberListResponse memberList(io.helidon.config.etcd.internal.client.proto.MemberListRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getMemberListMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class ClusterFutureStub extends io.grpc.stub.AbstractFutureStub {
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(
io.helidon.config.etcd.internal.client.proto.MemberAddRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getMemberAddMethod(), getCallOptions()), request);
}
/**
*
* MemberRemove removes an existing member from the cluster.
*
*/
public com.google.common.util.concurrent.ListenableFuture memberRemove(
io.helidon.config.etcd.internal.client.proto.MemberRemoveRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getMemberRemoveMethod(), getCallOptions()), request);
}
/**
*
* MemberUpdate updates the member configuration.
*
*/
public com.google.common.util.concurrent.ListenableFuture memberUpdate(
io.helidon.config.etcd.internal.client.proto.MemberUpdateRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getMemberUpdateMethod(), getCallOptions()), request);
}
/**
*
* MemberList lists all the members in the cluster.
*
*/
public com.google.common.util.concurrent.ListenableFuture memberList(
io.helidon.config.etcd.internal.client.proto.MemberListRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getMemberListMethod(), 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((io.helidon.config.etcd.internal.client.proto.MemberAddRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_MEMBER_REMOVE:
serviceImpl.memberRemove((io.helidon.config.etcd.internal.client.proto.MemberRemoveRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_MEMBER_UPDATE:
serviceImpl.memberUpdate((io.helidon.config.etcd.internal.client.proto.MemberUpdateRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_MEMBER_LIST:
serviceImpl.memberList((io.helidon.config.etcd.internal.client.proto.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 io.helidon.config.etcd.internal.client.proto.EtcdProto.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(getMemberAddMethod())
.addMethod(getMemberRemoveMethod())
.addMethod(getMemberUpdateMethod())
.addMethod(getMemberListMethod())
.build();
}
}
}
return result;
}
}