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

com.yandex.ydb.rate_limiter.v1.RateLimiterServiceGrpc Maven / Gradle / Ivy

There is a newer version: 1.45.6
Show newest version
package com.yandex.ydb.rate_limiter.v1;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * Control plane API
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.43.2)", comments = "Source: ydb/public/api/grpc/ydb_rate_limiter_v1.proto") @io.grpc.stub.annotations.GrpcGenerated public final class RateLimiterServiceGrpc { private RateLimiterServiceGrpc() {} public static final String SERVICE_NAME = "Ydb.RateLimiter.V1.RateLimiterService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getCreateResourceMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "CreateResource", requestType = com.yandex.ydb.rate_limiter.CreateResourceRequest.class, responseType = com.yandex.ydb.rate_limiter.CreateResourceResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getCreateResourceMethod() { io.grpc.MethodDescriptor getCreateResourceMethod; if ((getCreateResourceMethod = RateLimiterServiceGrpc.getCreateResourceMethod) == null) { synchronized (RateLimiterServiceGrpc.class) { if ((getCreateResourceMethod = RateLimiterServiceGrpc.getCreateResourceMethod) == null) { RateLimiterServiceGrpc.getCreateResourceMethod = getCreateResourceMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateResource")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.yandex.ydb.rate_limiter.CreateResourceRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.yandex.ydb.rate_limiter.CreateResourceResponse.getDefaultInstance())) .setSchemaDescriptor(new RateLimiterServiceMethodDescriptorSupplier("CreateResource")) .build(); } } } return getCreateResourceMethod; } private static volatile io.grpc.MethodDescriptor getAlterResourceMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "AlterResource", requestType = com.yandex.ydb.rate_limiter.AlterResourceRequest.class, responseType = com.yandex.ydb.rate_limiter.AlterResourceResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getAlterResourceMethod() { io.grpc.MethodDescriptor getAlterResourceMethod; if ((getAlterResourceMethod = RateLimiterServiceGrpc.getAlterResourceMethod) == null) { synchronized (RateLimiterServiceGrpc.class) { if ((getAlterResourceMethod = RateLimiterServiceGrpc.getAlterResourceMethod) == null) { RateLimiterServiceGrpc.getAlterResourceMethod = getAlterResourceMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AlterResource")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.yandex.ydb.rate_limiter.AlterResourceRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.yandex.ydb.rate_limiter.AlterResourceResponse.getDefaultInstance())) .setSchemaDescriptor(new RateLimiterServiceMethodDescriptorSupplier("AlterResource")) .build(); } } } return getAlterResourceMethod; } private static volatile io.grpc.MethodDescriptor getDropResourceMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "DropResource", requestType = com.yandex.ydb.rate_limiter.DropResourceRequest.class, responseType = com.yandex.ydb.rate_limiter.DropResourceResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getDropResourceMethod() { io.grpc.MethodDescriptor getDropResourceMethod; if ((getDropResourceMethod = RateLimiterServiceGrpc.getDropResourceMethod) == null) { synchronized (RateLimiterServiceGrpc.class) { if ((getDropResourceMethod = RateLimiterServiceGrpc.getDropResourceMethod) == null) { RateLimiterServiceGrpc.getDropResourceMethod = getDropResourceMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DropResource")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.yandex.ydb.rate_limiter.DropResourceRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.yandex.ydb.rate_limiter.DropResourceResponse.getDefaultInstance())) .setSchemaDescriptor(new RateLimiterServiceMethodDescriptorSupplier("DropResource")) .build(); } } } return getDropResourceMethod; } private static volatile io.grpc.MethodDescriptor getListResourcesMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ListResources", requestType = com.yandex.ydb.rate_limiter.ListResourcesRequest.class, responseType = com.yandex.ydb.rate_limiter.ListResourcesResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getListResourcesMethod() { io.grpc.MethodDescriptor getListResourcesMethod; if ((getListResourcesMethod = RateLimiterServiceGrpc.getListResourcesMethod) == null) { synchronized (RateLimiterServiceGrpc.class) { if ((getListResourcesMethod = RateLimiterServiceGrpc.getListResourcesMethod) == null) { RateLimiterServiceGrpc.getListResourcesMethod = getListResourcesMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListResources")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.yandex.ydb.rate_limiter.ListResourcesRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.yandex.ydb.rate_limiter.ListResourcesResponse.getDefaultInstance())) .setSchemaDescriptor(new RateLimiterServiceMethodDescriptorSupplier("ListResources")) .build(); } } } return getListResourcesMethod; } private static volatile io.grpc.MethodDescriptor getDescribeResourceMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "DescribeResource", requestType = com.yandex.ydb.rate_limiter.DescribeResourceRequest.class, responseType = com.yandex.ydb.rate_limiter.DescribeResourceResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getDescribeResourceMethod() { io.grpc.MethodDescriptor getDescribeResourceMethod; if ((getDescribeResourceMethod = RateLimiterServiceGrpc.getDescribeResourceMethod) == null) { synchronized (RateLimiterServiceGrpc.class) { if ((getDescribeResourceMethod = RateLimiterServiceGrpc.getDescribeResourceMethod) == null) { RateLimiterServiceGrpc.getDescribeResourceMethod = getDescribeResourceMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DescribeResource")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.yandex.ydb.rate_limiter.DescribeResourceRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.yandex.ydb.rate_limiter.DescribeResourceResponse.getDefaultInstance())) .setSchemaDescriptor(new RateLimiterServiceMethodDescriptorSupplier("DescribeResource")) .build(); } } } return getDescribeResourceMethod; } private static volatile io.grpc.MethodDescriptor getAcquireResourceMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "AcquireResource", requestType = com.yandex.ydb.rate_limiter.AcquireResourceRequest.class, responseType = com.yandex.ydb.rate_limiter.AcquireResourceResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getAcquireResourceMethod() { io.grpc.MethodDescriptor getAcquireResourceMethod; if ((getAcquireResourceMethod = RateLimiterServiceGrpc.getAcquireResourceMethod) == null) { synchronized (RateLimiterServiceGrpc.class) { if ((getAcquireResourceMethod = RateLimiterServiceGrpc.getAcquireResourceMethod) == null) { RateLimiterServiceGrpc.getAcquireResourceMethod = getAcquireResourceMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AcquireResource")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.yandex.ydb.rate_limiter.AcquireResourceRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.yandex.ydb.rate_limiter.AcquireResourceResponse.getDefaultInstance())) .setSchemaDescriptor(new RateLimiterServiceMethodDescriptorSupplier("AcquireResource")) .build(); } } } return getAcquireResourceMethod; } /** * Creates a new async stub that supports all call types for the service */ public static RateLimiterServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public RateLimiterServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RateLimiterServiceStub(channel, callOptions); } }; return RateLimiterServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static RateLimiterServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public RateLimiterServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RateLimiterServiceBlockingStub(channel, callOptions); } }; return RateLimiterServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static RateLimiterServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public RateLimiterServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RateLimiterServiceFutureStub(channel, callOptions); } }; return RateLimiterServiceFutureStub.newStub(factory, channel); } /** *
   * Control plane API
   * 
*/ public static abstract class RateLimiterServiceImplBase implements io.grpc.BindableService { /** *
     * Create a new resource in existing coordination node.
     * 
*/ public void createResource(com.yandex.ydb.rate_limiter.CreateResourceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateResourceMethod(), responseObserver); } /** *
     * Update a resource in coordination node.
     * 
*/ public void alterResource(com.yandex.ydb.rate_limiter.AlterResourceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAlterResourceMethod(), responseObserver); } /** *
     * Delete a resource from coordination node.
     * 
*/ public void dropResource(com.yandex.ydb.rate_limiter.DropResourceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDropResourceMethod(), responseObserver); } /** *
     * List resources in given coordination node.
     * 
*/ public void listResources(com.yandex.ydb.rate_limiter.ListResourcesRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListResourcesMethod(), responseObserver); } /** *
     * Describe properties of resource in coordination node.
     * 
*/ public void describeResource(com.yandex.ydb.rate_limiter.DescribeResourceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDescribeResourceMethod(), responseObserver); } /** *
     * Take units for usage of a resource in coordination node.
     * 
*/ public void acquireResource(com.yandex.ydb.rate_limiter.AcquireResourceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAcquireResourceMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getCreateResourceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.yandex.ydb.rate_limiter.CreateResourceRequest, com.yandex.ydb.rate_limiter.CreateResourceResponse>( this, METHODID_CREATE_RESOURCE))) .addMethod( getAlterResourceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.yandex.ydb.rate_limiter.AlterResourceRequest, com.yandex.ydb.rate_limiter.AlterResourceResponse>( this, METHODID_ALTER_RESOURCE))) .addMethod( getDropResourceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.yandex.ydb.rate_limiter.DropResourceRequest, com.yandex.ydb.rate_limiter.DropResourceResponse>( this, METHODID_DROP_RESOURCE))) .addMethod( getListResourcesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.yandex.ydb.rate_limiter.ListResourcesRequest, com.yandex.ydb.rate_limiter.ListResourcesResponse>( this, METHODID_LIST_RESOURCES))) .addMethod( getDescribeResourceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.yandex.ydb.rate_limiter.DescribeResourceRequest, com.yandex.ydb.rate_limiter.DescribeResourceResponse>( this, METHODID_DESCRIBE_RESOURCE))) .addMethod( getAcquireResourceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.yandex.ydb.rate_limiter.AcquireResourceRequest, com.yandex.ydb.rate_limiter.AcquireResourceResponse>( this, METHODID_ACQUIRE_RESOURCE))) .build(); } } /** *
   * Control plane API
   * 
*/ public static final class RateLimiterServiceStub extends io.grpc.stub.AbstractAsyncStub { private RateLimiterServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected RateLimiterServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RateLimiterServiceStub(channel, callOptions); } /** *
     * Create a new resource in existing coordination node.
     * 
*/ public void createResource(com.yandex.ydb.rate_limiter.CreateResourceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getCreateResourceMethod(), getCallOptions()), request, responseObserver); } /** *
     * Update a resource in coordination node.
     * 
*/ public void alterResource(com.yandex.ydb.rate_limiter.AlterResourceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getAlterResourceMethod(), getCallOptions()), request, responseObserver); } /** *
     * Delete a resource from coordination node.
     * 
*/ public void dropResource(com.yandex.ydb.rate_limiter.DropResourceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getDropResourceMethod(), getCallOptions()), request, responseObserver); } /** *
     * List resources in given coordination node.
     * 
*/ public void listResources(com.yandex.ydb.rate_limiter.ListResourcesRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getListResourcesMethod(), getCallOptions()), request, responseObserver); } /** *
     * Describe properties of resource in coordination node.
     * 
*/ public void describeResource(com.yandex.ydb.rate_limiter.DescribeResourceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getDescribeResourceMethod(), getCallOptions()), request, responseObserver); } /** *
     * Take units for usage of a resource in coordination node.
     * 
*/ public void acquireResource(com.yandex.ydb.rate_limiter.AcquireResourceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getAcquireResourceMethod(), getCallOptions()), request, responseObserver); } } /** *
   * Control plane API
   * 
*/ public static final class RateLimiterServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private RateLimiterServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected RateLimiterServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RateLimiterServiceBlockingStub(channel, callOptions); } /** *
     * Create a new resource in existing coordination node.
     * 
*/ public com.yandex.ydb.rate_limiter.CreateResourceResponse createResource(com.yandex.ydb.rate_limiter.CreateResourceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getCreateResourceMethod(), getCallOptions(), request); } /** *
     * Update a resource in coordination node.
     * 
*/ public com.yandex.ydb.rate_limiter.AlterResourceResponse alterResource(com.yandex.ydb.rate_limiter.AlterResourceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getAlterResourceMethod(), getCallOptions(), request); } /** *
     * Delete a resource from coordination node.
     * 
*/ public com.yandex.ydb.rate_limiter.DropResourceResponse dropResource(com.yandex.ydb.rate_limiter.DropResourceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDropResourceMethod(), getCallOptions(), request); } /** *
     * List resources in given coordination node.
     * 
*/ public com.yandex.ydb.rate_limiter.ListResourcesResponse listResources(com.yandex.ydb.rate_limiter.ListResourcesRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListResourcesMethod(), getCallOptions(), request); } /** *
     * Describe properties of resource in coordination node.
     * 
*/ public com.yandex.ydb.rate_limiter.DescribeResourceResponse describeResource(com.yandex.ydb.rate_limiter.DescribeResourceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDescribeResourceMethod(), getCallOptions(), request); } /** *
     * Take units for usage of a resource in coordination node.
     * 
*/ public com.yandex.ydb.rate_limiter.AcquireResourceResponse acquireResource(com.yandex.ydb.rate_limiter.AcquireResourceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getAcquireResourceMethod(), getCallOptions(), request); } } /** *
   * Control plane API
   * 
*/ public static final class RateLimiterServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private RateLimiterServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected RateLimiterServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RateLimiterServiceFutureStub(channel, callOptions); } /** *
     * Create a new resource in existing coordination node.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture createResource( com.yandex.ydb.rate_limiter.CreateResourceRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getCreateResourceMethod(), getCallOptions()), request); } /** *
     * Update a resource in coordination node.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture alterResource( com.yandex.ydb.rate_limiter.AlterResourceRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getAlterResourceMethod(), getCallOptions()), request); } /** *
     * Delete a resource from coordination node.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture dropResource( com.yandex.ydb.rate_limiter.DropResourceRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDropResourceMethod(), getCallOptions()), request); } /** *
     * List resources in given coordination node.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture listResources( com.yandex.ydb.rate_limiter.ListResourcesRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListResourcesMethod(), getCallOptions()), request); } /** *
     * Describe properties of resource in coordination node.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture describeResource( com.yandex.ydb.rate_limiter.DescribeResourceRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDescribeResourceMethod(), getCallOptions()), request); } /** *
     * Take units for usage of a resource in coordination node.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture acquireResource( com.yandex.ydb.rate_limiter.AcquireResourceRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getAcquireResourceMethod(), getCallOptions()), request); } } private static final int METHODID_CREATE_RESOURCE = 0; private static final int METHODID_ALTER_RESOURCE = 1; private static final int METHODID_DROP_RESOURCE = 2; private static final int METHODID_LIST_RESOURCES = 3; private static final int METHODID_DESCRIBE_RESOURCE = 4; private static final int METHODID_ACQUIRE_RESOURCE = 5; 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 RateLimiterServiceImplBase serviceImpl; private final int methodId; MethodHandlers(RateLimiterServiceImplBase 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_CREATE_RESOURCE: serviceImpl.createResource((com.yandex.ydb.rate_limiter.CreateResourceRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_ALTER_RESOURCE: serviceImpl.alterResource((com.yandex.ydb.rate_limiter.AlterResourceRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_DROP_RESOURCE: serviceImpl.dropResource((com.yandex.ydb.rate_limiter.DropResourceRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_LIST_RESOURCES: serviceImpl.listResources((com.yandex.ydb.rate_limiter.ListResourcesRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_DESCRIBE_RESOURCE: serviceImpl.describeResource((com.yandex.ydb.rate_limiter.DescribeResourceRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_ACQUIRE_RESOURCE: serviceImpl.acquireResource((com.yandex.ydb.rate_limiter.AcquireResourceRequest) 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 RateLimiterServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { RateLimiterServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return com.yandex.ydb.rate_limiter.v1.RateLimiterGrpc.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("RateLimiterService"); } } private static final class RateLimiterServiceFileDescriptorSupplier extends RateLimiterServiceBaseDescriptorSupplier { RateLimiterServiceFileDescriptorSupplier() {} } private static final class RateLimiterServiceMethodDescriptorSupplier extends RateLimiterServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; RateLimiterServiceMethodDescriptorSupplier(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 (RateLimiterServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new RateLimiterServiceFileDescriptorSupplier()) .addMethod(getCreateResourceMethod()) .addMethod(getAlterResourceMethod()) .addMethod(getDropResourceMethod()) .addMethod(getListResourcesMethod()) .addMethod(getDescribeResourceMethod()) .addMethod(getAcquireResourceMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy