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

logproto.IngesterGrpc Maven / Gradle / Ivy

package logproto;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.35.0)",
    comments = "Source: logproto.proto")
public final class IngesterGrpc {

  private IngesterGrpc() {}

  public static final String SERVICE_NAME = "logproto.Ingester";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor getTransferChunksMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "TransferChunks",
      requestType = logproto.Logproto.TimeSeriesChunk.class,
      responseType = logproto.Logproto.TransferChunksResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
  public static io.grpc.MethodDescriptor getTransferChunksMethod() {
    io.grpc.MethodDescriptor getTransferChunksMethod;
    if ((getTransferChunksMethod = IngesterGrpc.getTransferChunksMethod) == null) {
      synchronized (IngesterGrpc.class) {
        if ((getTransferChunksMethod = IngesterGrpc.getTransferChunksMethod) == null) {
          IngesterGrpc.getTransferChunksMethod = getTransferChunksMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TransferChunks"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  logproto.Logproto.TimeSeriesChunk.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  logproto.Logproto.TransferChunksResponse.getDefaultInstance()))
              .setSchemaDescriptor(new IngesterMethodDescriptorSupplier("TransferChunks"))
              .build();
        }
      }
    }
    return getTransferChunksMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static IngesterStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public IngesterStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new IngesterStub(channel, callOptions);
        }
      };
    return IngesterStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static IngesterBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public IngesterBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new IngesterBlockingStub(channel, callOptions);
        }
      };
    return IngesterBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static IngesterFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public IngesterFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new IngesterFutureStub(channel, callOptions);
        }
      };
    return IngesterFutureStub.newStub(factory, channel);
  }

  /**
   */
  public static abstract class IngesterImplBase implements io.grpc.BindableService {

    /**
     */
    public io.grpc.stub.StreamObserver transferChunks(
        io.grpc.stub.StreamObserver responseObserver) {
      return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getTransferChunksMethod(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getTransferChunksMethod(),
            io.grpc.stub.ServerCalls.asyncClientStreamingCall(
              new MethodHandlers<
                logproto.Logproto.TimeSeriesChunk,
                logproto.Logproto.TransferChunksResponse>(
                  this, METHODID_TRANSFER_CHUNKS)))
          .build();
    }
  }

  /**
   */
  public static final class IngesterStub extends io.grpc.stub.AbstractAsyncStub {
    private IngesterStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected IngesterStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new IngesterStub(channel, callOptions);
    }

    /**
     */
    public io.grpc.stub.StreamObserver transferChunks(
        io.grpc.stub.StreamObserver responseObserver) {
      return io.grpc.stub.ClientCalls.asyncClientStreamingCall(
          getChannel().newCall(getTransferChunksMethod(), getCallOptions()), responseObserver);
    }
  }

  /**
   */
  public static final class IngesterBlockingStub extends io.grpc.stub.AbstractBlockingStub {
    private IngesterBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected IngesterBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new IngesterBlockingStub(channel, callOptions);
    }
  }

  /**
   */
  public static final class IngesterFutureStub extends io.grpc.stub.AbstractFutureStub {
    private IngesterFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected IngesterFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new IngesterFutureStub(channel, callOptions);
    }
  }

  private static final int METHODID_TRANSFER_CHUNKS = 0;

  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 IngesterImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(IngesterImplBase 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) {
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver invoke(
        io.grpc.stub.StreamObserver responseObserver) {
      switch (methodId) {
        case METHODID_TRANSFER_CHUNKS:
          return (io.grpc.stub.StreamObserver) serviceImpl.transferChunks(
              (io.grpc.stub.StreamObserver) responseObserver);
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class IngesterBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    IngesterBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return logproto.Logproto.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("Ingester");
    }
  }

  private static final class IngesterFileDescriptorSupplier
      extends IngesterBaseDescriptorSupplier {
    IngesterFileDescriptorSupplier() {}
  }

  private static final class IngesterMethodDescriptorSupplier
      extends IngesterBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    IngesterMethodDescriptorSupplier(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 (IngesterGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new IngesterFileDescriptorSupplier())
              .addMethod(getTransferChunksMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy