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

io.numaproj.numaflow.sink.v1.SinkGrpc Maven / Gradle / Ivy

The newest version!
package io.numaproj.numaflow.sink.v1;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.65.0)",
    comments = "Source: sink/v1/sink.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class SinkGrpc {

  private SinkGrpc() {}

  public static final java.lang.String SERVICE_NAME = "sink.v1.Sink";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "SinkFn",
      requestType = io.numaproj.numaflow.sink.v1.SinkOuterClass.SinkRequest.class,
      responseType = io.numaproj.numaflow.sink.v1.SinkOuterClass.SinkResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor getSinkFnMethod() {
    io.grpc.MethodDescriptor getSinkFnMethod;
    if ((getSinkFnMethod = SinkGrpc.getSinkFnMethod) == null) {
      synchronized (SinkGrpc.class) {
        if ((getSinkFnMethod = SinkGrpc.getSinkFnMethod) == null) {
          SinkGrpc.getSinkFnMethod = getSinkFnMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SinkFn"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.sink.v1.SinkOuterClass.SinkRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.sink.v1.SinkOuterClass.SinkResponse.getDefaultInstance()))
              .setSchemaDescriptor(new SinkMethodDescriptorSupplier("SinkFn"))
              .build();
        }
      }
    }
    return getSinkFnMethod;
  }

  private static volatile io.grpc.MethodDescriptor getIsReadyMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "IsReady",
      requestType = com.google.protobuf.Empty.class,
      responseType = io.numaproj.numaflow.sink.v1.SinkOuterClass.ReadyResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getIsReadyMethod() {
    io.grpc.MethodDescriptor getIsReadyMethod;
    if ((getIsReadyMethod = SinkGrpc.getIsReadyMethod) == null) {
      synchronized (SinkGrpc.class) {
        if ((getIsReadyMethod = SinkGrpc.getIsReadyMethod) == null) {
          SinkGrpc.getIsReadyMethod = getIsReadyMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "IsReady"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.protobuf.Empty.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.sink.v1.SinkOuterClass.ReadyResponse.getDefaultInstance()))
              .setSchemaDescriptor(new SinkMethodDescriptorSupplier("IsReady"))
              .build();
        }
      }
    }
    return getIsReadyMethod;
  }

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

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

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

  /**
   */
  public interface AsyncService {

    /**
     * 
     * SinkFn writes the request to a user defined sink.
     * 
*/ default io.grpc.stub.StreamObserver sinkFn( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getSinkFnMethod(), responseObserver); } /** *
     * IsReady is the heartbeat endpoint for gRPC.
     * 
*/ default void isReady(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getIsReadyMethod(), responseObserver); } } /** * Base class for the server implementation of the service Sink. */ public static abstract class SinkImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return SinkGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service Sink. */ public static final class SinkStub extends io.grpc.stub.AbstractAsyncStub { private SinkStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected SinkStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new SinkStub(channel, callOptions); } /** *
     * SinkFn writes the request to a user defined sink.
     * 
*/ public io.grpc.stub.StreamObserver sinkFn( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getSinkFnMethod(), getCallOptions()), responseObserver); } /** *
     * IsReady is the heartbeat endpoint for gRPC.
     * 
*/ public void isReady(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getIsReadyMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service Sink. */ public static final class SinkBlockingStub extends io.grpc.stub.AbstractBlockingStub { private SinkBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected SinkBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new SinkBlockingStub(channel, callOptions); } /** *
     * IsReady is the heartbeat endpoint for gRPC.
     * 
*/ public io.numaproj.numaflow.sink.v1.SinkOuterClass.ReadyResponse isReady(com.google.protobuf.Empty request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getIsReadyMethod(), getCallOptions(), request); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service Sink. */ public static final class SinkFutureStub extends io.grpc.stub.AbstractFutureStub { private SinkFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected SinkFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new SinkFutureStub(channel, callOptions); } /** *
     * IsReady is the heartbeat endpoint for gRPC.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture isReady( com.google.protobuf.Empty request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getIsReadyMethod(), getCallOptions()), request); } } private static final int METHODID_IS_READY = 0; private static final int METHODID_SINK_FN = 1; 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 AsyncService serviceImpl; private final int methodId; MethodHandlers(AsyncService 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_IS_READY: serviceImpl.isReady((com.google.protobuf.Empty) 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) { case METHODID_SINK_FN: return (io.grpc.stub.StreamObserver) serviceImpl.sinkFn( (io.grpc.stub.StreamObserver) responseObserver); default: throw new AssertionError(); } } } public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getSinkFnMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< io.numaproj.numaflow.sink.v1.SinkOuterClass.SinkRequest, io.numaproj.numaflow.sink.v1.SinkOuterClass.SinkResponse>( service, METHODID_SINK_FN))) .addMethod( getIsReadyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.protobuf.Empty, io.numaproj.numaflow.sink.v1.SinkOuterClass.ReadyResponse>( service, METHODID_IS_READY))) .build(); } private static abstract class SinkBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { SinkBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return io.numaproj.numaflow.sink.v1.SinkOuterClass.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("Sink"); } } private static final class SinkFileDescriptorSupplier extends SinkBaseDescriptorSupplier { SinkFileDescriptorSupplier() {} } private static final class SinkMethodDescriptorSupplier extends SinkBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final java.lang.String methodName; SinkMethodDescriptorSupplier(java.lang.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 (SinkGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new SinkFileDescriptorSupplier()) .addMethod(getSinkFnMethod()) .addMethod(getIsReadyMethod()) .build(); } } } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy