All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.etcd.jetcd.api.ClusterGrpc Maven / Gradle / Ivy

There is a newer version: 0.8.4
Show newest version
package io.etcd.jetcd.api;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.39.0)",
    comments = "Source: rpc.proto")
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.etcd.jetcd.api.MemberAddRequest.class,
      responseType = io.etcd.jetcd.api.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.etcd.jetcd.api.MemberAddRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.etcd.jetcd.api.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.etcd.jetcd.api.MemberRemoveRequest.class,
      responseType = io.etcd.jetcd.api.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.etcd.jetcd.api.MemberRemoveRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.etcd.jetcd.api.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.etcd.jetcd.api.MemberUpdateRequest.class,
      responseType = io.etcd.jetcd.api.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.etcd.jetcd.api.MemberUpdateRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.etcd.jetcd.api.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.etcd.jetcd.api.MemberListRequest.class,
      responseType = io.etcd.jetcd.api.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.etcd.jetcd.api.MemberListRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.etcd.jetcd.api.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.etcd.jetcd.api.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.etcd.jetcd.api.MemberRemoveRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMemberRemoveMethod(), responseObserver); } /** *
     * MemberUpdate updates the member configuration.
     * 
*/ public void memberUpdate(io.etcd.jetcd.api.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.etcd.jetcd.api.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.etcd.jetcd.api.MemberAddRequest, io.etcd.jetcd.api.MemberAddResponse>( this, METHODID_MEMBER_ADD))) .addMethod( getMemberRemoveMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< io.etcd.jetcd.api.MemberRemoveRequest, io.etcd.jetcd.api.MemberRemoveResponse>( this, METHODID_MEMBER_REMOVE))) .addMethod( getMemberUpdateMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< io.etcd.jetcd.api.MemberUpdateRequest, io.etcd.jetcd.api.MemberUpdateResponse>( this, METHODID_MEMBER_UPDATE))) .addMethod( getMemberListMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< io.etcd.jetcd.api.MemberListRequest, io.etcd.jetcd.api.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.etcd.jetcd.api.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.etcd.jetcd.api.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.etcd.jetcd.api.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.etcd.jetcd.api.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.etcd.jetcd.api.MemberAddResponse memberAdd(io.etcd.jetcd.api.MemberAddRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getMemberAddMethod(), getCallOptions(), request); } /** *
     * MemberRemove removes an existing member from the cluster.
     * 
*/ public io.etcd.jetcd.api.MemberRemoveResponse memberRemove(io.etcd.jetcd.api.MemberRemoveRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getMemberRemoveMethod(), getCallOptions(), request); } /** *
     * MemberUpdate updates the member configuration.
     * 
*/ public io.etcd.jetcd.api.MemberUpdateResponse memberUpdate(io.etcd.jetcd.api.MemberUpdateRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getMemberUpdateMethod(), getCallOptions(), request); } /** *
     * MemberList lists all the members in the cluster.
     * 
*/ public io.etcd.jetcd.api.MemberListResponse memberList(io.etcd.jetcd.api.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.etcd.jetcd.api.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.etcd.jetcd.api.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.etcd.jetcd.api.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.etcd.jetcd.api.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.etcd.jetcd.api.MemberAddRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_MEMBER_REMOVE: serviceImpl.memberRemove((io.etcd.jetcd.api.MemberRemoveRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_MEMBER_UPDATE: serviceImpl.memberUpdate((io.etcd.jetcd.api.MemberUpdateRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_MEMBER_LIST: serviceImpl.memberList((io.etcd.jetcd.api.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.etcd.jetcd.api.JetcdProto.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; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy