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

etcdserverpb.MaintenanceGrpc Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
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 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")
  public static final io.grpc.MethodDescriptor METHOD_ALARM =
      io.grpc.MethodDescriptor.newBuilder()
          .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
          .setFullMethodName(generateFullMethodName(
              "etcdserverpb.Maintenance", "Alarm"))
          .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              etcdserverpb.Rpc.AlarmRequest.getDefaultInstance()))
          .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              etcdserverpb.Rpc.AlarmResponse.getDefaultInstance()))
          .setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Alarm"))
          .build();
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor METHOD_STATUS =
      io.grpc.MethodDescriptor.newBuilder()
          .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
          .setFullMethodName(generateFullMethodName(
              "etcdserverpb.Maintenance", "Status"))
          .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              etcdserverpb.Rpc.StatusRequest.getDefaultInstance()))
          .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              etcdserverpb.Rpc.StatusResponse.getDefaultInstance()))
          .setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Status"))
          .build();
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor METHOD_DEFRAGMENT =
      io.grpc.MethodDescriptor.newBuilder()
          .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
          .setFullMethodName(generateFullMethodName(
              "etcdserverpb.Maintenance", "Defragment"))
          .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              etcdserverpb.Rpc.DefragmentRequest.getDefaultInstance()))
          .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              etcdserverpb.Rpc.DefragmentResponse.getDefaultInstance()))
          .setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Defragment"))
          .build();
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor METHOD_HASH =
      io.grpc.MethodDescriptor.newBuilder()
          .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
          .setFullMethodName(generateFullMethodName(
              "etcdserverpb.Maintenance", "Hash"))
          .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              etcdserverpb.Rpc.HashRequest.getDefaultInstance()))
          .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              etcdserverpb.Rpc.HashResponse.getDefaultInstance()))
          .setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Hash"))
          .build();
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor METHOD_SNAPSHOT =
      io.grpc.MethodDescriptor.newBuilder()
          .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
          .setFullMethodName(generateFullMethodName(
              "etcdserverpb.Maintenance", "Snapshot"))
          .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              etcdserverpb.Rpc.SnapshotRequest.getDefaultInstance()))
          .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              etcdserverpb.Rpc.SnapshotResponse.getDefaultInstance()))
          .setSchemaDescriptor(new MaintenanceMethodDescriptorSupplier("Snapshot"))
          .build();

  /**
   * 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(etcdserverpb.Rpc.AlarmRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_ALARM, responseObserver); } /** *
     * Status gets the status of the member.
     * 
*/ public void status(etcdserverpb.Rpc.StatusRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_STATUS, responseObserver); } /** *
     * Defragment defragments a member's backend database to recover storage space.
     * 
*/ public void defragment(etcdserverpb.Rpc.DefragmentRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_DEFRAGMENT, responseObserver); } /** *
     * Hash returns the hash of the local KV state for consistency checking purpose.
     * This is designed for testing; do not use this in production when there
     * are ongoing transactions.
     * 
*/ public void hash(etcdserverpb.Rpc.HashRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_HASH, responseObserver); } /** *
     * Snapshot sends a snapshot of the entire backend from a member over a stream to a client.
     * 
*/ public void snapshot(etcdserverpb.Rpc.SnapshotRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_SNAPSHOT, responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( METHOD_ALARM, asyncUnaryCall( new MethodHandlers< etcdserverpb.Rpc.AlarmRequest, etcdserverpb.Rpc.AlarmResponse>( this, METHODID_ALARM))) .addMethod( METHOD_STATUS, asyncUnaryCall( new MethodHandlers< etcdserverpb.Rpc.StatusRequest, etcdserverpb.Rpc.StatusResponse>( this, METHODID_STATUS))) .addMethod( METHOD_DEFRAGMENT, asyncUnaryCall( new MethodHandlers< etcdserverpb.Rpc.DefragmentRequest, etcdserverpb.Rpc.DefragmentResponse>( this, METHODID_DEFRAGMENT))) .addMethod( METHOD_HASH, asyncUnaryCall( new MethodHandlers< etcdserverpb.Rpc.HashRequest, etcdserverpb.Rpc.HashResponse>( this, METHODID_HASH))) .addMethod( METHOD_SNAPSHOT, asyncServerStreamingCall( new MethodHandlers< etcdserverpb.Rpc.SnapshotRequest, etcdserverpb.Rpc.SnapshotResponse>( this, METHODID_SNAPSHOT))) .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(etcdserverpb.Rpc.AlarmRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_ALARM, getCallOptions()), request, responseObserver); } /** *
     * Status gets the status of the member.
     * 
*/ public void status(etcdserverpb.Rpc.StatusRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_STATUS, getCallOptions()), request, responseObserver); } /** *
     * Defragment defragments a member's backend database to recover storage space.
     * 
*/ public void defragment(etcdserverpb.Rpc.DefragmentRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_DEFRAGMENT, getCallOptions()), request, responseObserver); } /** *
     * Hash returns the hash of the local KV state for consistency checking purpose.
     * This is designed for testing; do not use this in production when there
     * are ongoing transactions.
     * 
*/ public void hash(etcdserverpb.Rpc.HashRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_HASH, getCallOptions()), request, responseObserver); } /** *
     * Snapshot sends a snapshot of the entire backend from a member over a stream to a client.
     * 
*/ public void snapshot(etcdserverpb.Rpc.SnapshotRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( getChannel().newCall(METHOD_SNAPSHOT, 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 etcdserverpb.Rpc.AlarmResponse alarm(etcdserverpb.Rpc.AlarmRequest request) { return blockingUnaryCall( getChannel(), METHOD_ALARM, getCallOptions(), request); } /** *
     * Status gets the status of the member.
     * 
*/ public etcdserverpb.Rpc.StatusResponse status(etcdserverpb.Rpc.StatusRequest request) { return blockingUnaryCall( getChannel(), METHOD_STATUS, getCallOptions(), request); } /** *
     * Defragment defragments a member's backend database to recover storage space.
     * 
*/ public etcdserverpb.Rpc.DefragmentResponse defragment(etcdserverpb.Rpc.DefragmentRequest request) { return blockingUnaryCall( getChannel(), METHOD_DEFRAGMENT, getCallOptions(), request); } /** *
     * Hash returns the hash of the local KV state for consistency checking purpose.
     * This is designed for testing; do not use this in production when there
     * are ongoing transactions.
     * 
*/ public etcdserverpb.Rpc.HashResponse hash(etcdserverpb.Rpc.HashRequest request) { return blockingUnaryCall( getChannel(), METHOD_HASH, getCallOptions(), request); } /** *
     * Snapshot sends a snapshot of the entire backend from a member over a stream to a client.
     * 
*/ public java.util.Iterator snapshot( etcdserverpb.Rpc.SnapshotRequest request) { return blockingServerStreamingCall( getChannel(), METHOD_SNAPSHOT, 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( etcdserverpb.Rpc.AlarmRequest request) { return futureUnaryCall( getChannel().newCall(METHOD_ALARM, getCallOptions()), request); } /** *
     * Status gets the status of the member.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture status( etcdserverpb.Rpc.StatusRequest request) { return futureUnaryCall( getChannel().newCall(METHOD_STATUS, getCallOptions()), request); } /** *
     * Defragment defragments a member's backend database to recover storage space.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture defragment( etcdserverpb.Rpc.DefragmentRequest request) { return futureUnaryCall( getChannel().newCall(METHOD_DEFRAGMENT, getCallOptions()), request); } /** *
     * Hash returns the hash of the local KV state for consistency checking purpose.
     * This is designed for testing; do not use this in production when there
     * are ongoing transactions.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture hash( etcdserverpb.Rpc.HashRequest request) { return futureUnaryCall( getChannel().newCall(METHOD_HASH, 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_SNAPSHOT = 4; 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((etcdserverpb.Rpc.AlarmRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_STATUS: serviceImpl.status((etcdserverpb.Rpc.StatusRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_DEFRAGMENT: serviceImpl.defragment((etcdserverpb.Rpc.DefragmentRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_HASH: serviceImpl.hash((etcdserverpb.Rpc.HashRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_SNAPSHOT: serviceImpl.snapshot((etcdserverpb.Rpc.SnapshotRequest) 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 etcdserverpb.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(METHOD_ALARM) .addMethod(METHOD_STATUS) .addMethod(METHOD_DEFRAGMENT) .addMethod(METHOD_HASH) .addMethod(METHOD_SNAPSHOT) .build(); } } } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy