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

com.ibm.etcd.api.ClusterGrpc Maven / Gradle / Ivy

There is a newer version: 0.0.24
Show newest version
package com.ibm.etcd.api;

import static io.grpc.MethodDescriptor.generateFullMethodName;

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy