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

io.numaproj.numaflow.reduce.v1.ReduceGrpc Maven / Gradle / Ivy

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

import static io.grpc.MethodDescriptor.generateFullMethodName;

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

  private ReduceGrpc() {}

  public static final java.lang.String SERVICE_NAME = "reduce.v1.Reduce";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "ReduceFn",
      requestType = io.numaproj.numaflow.reduce.v1.ReduceOuterClass.ReduceRequest.class,
      responseType = io.numaproj.numaflow.reduce.v1.ReduceOuterClass.ReduceResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor getReduceFnMethod() {
    io.grpc.MethodDescriptor getReduceFnMethod;
    if ((getReduceFnMethod = ReduceGrpc.getReduceFnMethod) == null) {
      synchronized (ReduceGrpc.class) {
        if ((getReduceFnMethod = ReduceGrpc.getReduceFnMethod) == null) {
          ReduceGrpc.getReduceFnMethod = getReduceFnMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReduceFn"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.reduce.v1.ReduceOuterClass.ReduceRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.reduce.v1.ReduceOuterClass.ReduceResponse.getDefaultInstance()))
              .setSchemaDescriptor(new ReduceMethodDescriptorSupplier("ReduceFn"))
              .build();
        }
      }
    }
    return getReduceFnMethod;
  }

  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.reduce.v1.ReduceOuterClass.ReadyResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getIsReadyMethod() {
    io.grpc.MethodDescriptor getIsReadyMethod;
    if ((getIsReadyMethod = ReduceGrpc.getIsReadyMethod) == null) {
      synchronized (ReduceGrpc.class) {
        if ((getIsReadyMethod = ReduceGrpc.getIsReadyMethod) == null) {
          ReduceGrpc.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.reduce.v1.ReduceOuterClass.ReadyResponse.getDefaultInstance()))
              .setSchemaDescriptor(new ReduceMethodDescriptorSupplier("IsReady"))
              .build();
        }
      }
    }
    return getIsReadyMethod;
  }

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

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

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

  /**
   */
  public interface AsyncService {

    /**
     * 
     * ReduceFn applies a reduce function to a stream of reduce requests and sends reduce response back in a streaming fashion.
     * 
*/ default io.grpc.stub.StreamObserver reduceFn( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getReduceFnMethod(), 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 Reduce. */ public static abstract class ReduceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return ReduceGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service Reduce. */ public static final class ReduceStub extends io.grpc.stub.AbstractAsyncStub { private ReduceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ReduceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ReduceStub(channel, callOptions); } /** *
     * ReduceFn applies a reduce function to a stream of reduce requests and sends reduce response back in a streaming fashion.
     * 
*/ public io.grpc.stub.StreamObserver reduceFn( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getReduceFnMethod(), 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 Reduce. */ public static final class ReduceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private ReduceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ReduceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ReduceBlockingStub(channel, callOptions); } /** *
     * IsReady is the heartbeat endpoint for gRPC.
     * 
*/ public io.numaproj.numaflow.reduce.v1.ReduceOuterClass.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 Reduce. */ public static final class ReduceFutureStub extends io.grpc.stub.AbstractFutureStub { private ReduceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ReduceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ReduceFutureStub(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_REDUCE_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_REDUCE_FN: return (io.grpc.stub.StreamObserver) serviceImpl.reduceFn( (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( getReduceFnMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< io.numaproj.numaflow.reduce.v1.ReduceOuterClass.ReduceRequest, io.numaproj.numaflow.reduce.v1.ReduceOuterClass.ReduceResponse>( service, METHODID_REDUCE_FN))) .addMethod( getIsReadyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.protobuf.Empty, io.numaproj.numaflow.reduce.v1.ReduceOuterClass.ReadyResponse>( service, METHODID_IS_READY))) .build(); } private static abstract class ReduceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { ReduceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return io.numaproj.numaflow.reduce.v1.ReduceOuterClass.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("Reduce"); } } private static final class ReduceFileDescriptorSupplier extends ReduceBaseDescriptorSupplier { ReduceFileDescriptorSupplier() {} } private static final class ReduceMethodDescriptorSupplier extends ReduceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final java.lang.String methodName; ReduceMethodDescriptorSupplier(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 (ReduceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ReduceFileDescriptorSupplier()) .addMethod(getReduceFnMethod()) .addMethod(getIsReadyMethod()) .build(); } } } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy