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

io.numaproj.numaflow.mapstream.v1.MapStreamGrpc Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package io.numaproj.numaflow.mapstream.v1;

import static io.grpc.MethodDescriptor.generateFullMethodName;

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

  private MapStreamGrpc() {}

  public static final String SERVICE_NAME = "mapstream.v1.MapStream";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "MapStreamFn",
      requestType = io.numaproj.numaflow.mapstream.v1.Mapstream.MapStreamRequest.class,
      responseType = io.numaproj.numaflow.mapstream.v1.Mapstream.MapStreamResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor getMapStreamFnMethod() {
    io.grpc.MethodDescriptor getMapStreamFnMethod;
    if ((getMapStreamFnMethod = MapStreamGrpc.getMapStreamFnMethod) == null) {
      synchronized (MapStreamGrpc.class) {
        if ((getMapStreamFnMethod = MapStreamGrpc.getMapStreamFnMethod) == null) {
          MapStreamGrpc.getMapStreamFnMethod = getMapStreamFnMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MapStreamFn"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.mapstream.v1.Mapstream.MapStreamRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.mapstream.v1.Mapstream.MapStreamResponse.getDefaultInstance()))
              .setSchemaDescriptor(new MapStreamMethodDescriptorSupplier("MapStreamFn"))
              .build();
        }
      }
    }
    return getMapStreamFnMethod;
  }

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

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

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

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

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

    /**
     * 
     * MapStreamFn applies a function to each request element and returns a stream.
     * 
*/ public void mapStreamFn(io.numaproj.numaflow.mapstream.v1.Mapstream.MapStreamRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMapStreamFnMethod(), responseObserver); } /** *
     * IsReady is the heartbeat endpoint for gRPC.
     * 
*/ public void isReady(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getIsReadyMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getMapStreamFnMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( new MethodHandlers< io.numaproj.numaflow.mapstream.v1.Mapstream.MapStreamRequest, io.numaproj.numaflow.mapstream.v1.Mapstream.MapStreamResponse>( this, METHODID_MAP_STREAM_FN))) .addMethod( getIsReadyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.protobuf.Empty, io.numaproj.numaflow.mapstream.v1.Mapstream.ReadyResponse>( this, METHODID_IS_READY))) .build(); } } /** */ public static final class MapStreamStub extends io.grpc.stub.AbstractAsyncStub { private MapStreamStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected MapStreamStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new MapStreamStub(channel, callOptions); } /** *
     * MapStreamFn applies a function to each request element and returns a stream.
     * 
*/ public void mapStreamFn(io.numaproj.numaflow.mapstream.v1.Mapstream.MapStreamRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncServerStreamingCall( getChannel().newCall(getMapStreamFnMethod(), getCallOptions()), request, 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); } } /** */ public static final class MapStreamBlockingStub extends io.grpc.stub.AbstractBlockingStub { private MapStreamBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected MapStreamBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new MapStreamBlockingStub(channel, callOptions); } /** *
     * MapStreamFn applies a function to each request element and returns a stream.
     * 
*/ public java.util.Iterator mapStreamFn( io.numaproj.numaflow.mapstream.v1.Mapstream.MapStreamRequest request) { return io.grpc.stub.ClientCalls.blockingServerStreamingCall( getChannel(), getMapStreamFnMethod(), getCallOptions(), request); } /** *
     * IsReady is the heartbeat endpoint for gRPC.
     * 
*/ public io.numaproj.numaflow.mapstream.v1.Mapstream.ReadyResponse isReady(com.google.protobuf.Empty request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getIsReadyMethod(), getCallOptions(), request); } } /** */ public static final class MapStreamFutureStub extends io.grpc.stub.AbstractFutureStub { private MapStreamFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected MapStreamFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new MapStreamFutureStub(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_MAP_STREAM_FN = 0; private static final int METHODID_IS_READY = 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 MapStreamImplBase serviceImpl; private final int methodId; MethodHandlers(MapStreamImplBase 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_MAP_STREAM_FN: serviceImpl.mapStreamFn((io.numaproj.numaflow.mapstream.v1.Mapstream.MapStreamRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; 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) { default: throw new AssertionError(); } } } private static abstract class MapStreamBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { MapStreamBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return io.numaproj.numaflow.mapstream.v1.Mapstream.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("MapStream"); } } private static final class MapStreamFileDescriptorSupplier extends MapStreamBaseDescriptorSupplier { MapStreamFileDescriptorSupplier() {} } private static final class MapStreamMethodDescriptorSupplier extends MapStreamBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; MapStreamMethodDescriptorSupplier(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 (MapStreamGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new MapStreamFileDescriptorSupplier()) .addMethod(getMapStreamFnMethod()) .addMethod(getIsReadyMethod()) .build(); } } } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy