com.tencent.polaris.ratelimit.client.pb.RateLimitGRPCV2Grpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of polaris-all Show documentation
Show all versions of polaris-all Show documentation
All in one project for polaris-java
package com.tencent.polaris.ratelimit.client.pb;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.59.1)",
comments = "Source: grpcapi_v2_metric.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class RateLimitGRPCV2Grpc {
private RateLimitGRPCV2Grpc() {}
public static final java.lang.String SERVICE_NAME = "polaris.metric.v2.RateLimitGRPCV2";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getServiceMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Service",
requestType = com.tencent.polaris.ratelimit.client.pb.RatelimitV2.RateLimitRequest.class,
responseType = com.tencent.polaris.ratelimit.client.pb.RatelimitV2.RateLimitResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getServiceMethod() {
io.grpc.MethodDescriptor getServiceMethod;
if ((getServiceMethod = RateLimitGRPCV2Grpc.getServiceMethod) == null) {
synchronized (RateLimitGRPCV2Grpc.class) {
if ((getServiceMethod = RateLimitGRPCV2Grpc.getServiceMethod) == null) {
RateLimitGRPCV2Grpc.getServiceMethod = getServiceMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Service"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.tencent.polaris.ratelimit.client.pb.RatelimitV2.RateLimitRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.tencent.polaris.ratelimit.client.pb.RatelimitV2.RateLimitResponse.getDefaultInstance()))
.setSchemaDescriptor(new RateLimitGRPCV2MethodDescriptorSupplier("Service"))
.build();
}
}
}
return getServiceMethod;
}
private static volatile io.grpc.MethodDescriptor getTimeAdjustMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "TimeAdjust",
requestType = com.tencent.polaris.ratelimit.client.pb.RatelimitV2.TimeAdjustRequest.class,
responseType = com.tencent.polaris.ratelimit.client.pb.RatelimitV2.TimeAdjustResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getTimeAdjustMethod() {
io.grpc.MethodDescriptor getTimeAdjustMethod;
if ((getTimeAdjustMethod = RateLimitGRPCV2Grpc.getTimeAdjustMethod) == null) {
synchronized (RateLimitGRPCV2Grpc.class) {
if ((getTimeAdjustMethod = RateLimitGRPCV2Grpc.getTimeAdjustMethod) == null) {
RateLimitGRPCV2Grpc.getTimeAdjustMethod = getTimeAdjustMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "TimeAdjust"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.tencent.polaris.ratelimit.client.pb.RatelimitV2.TimeAdjustRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.tencent.polaris.ratelimit.client.pb.RatelimitV2.TimeAdjustResponse.getDefaultInstance()))
.setSchemaDescriptor(new RateLimitGRPCV2MethodDescriptorSupplier("TimeAdjust"))
.build();
}
}
}
return getTimeAdjustMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static RateLimitGRPCV2Stub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RateLimitGRPCV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitGRPCV2Stub(channel, callOptions);
}
};
return RateLimitGRPCV2Stub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static RateLimitGRPCV2BlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RateLimitGRPCV2BlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitGRPCV2BlockingStub(channel, callOptions);
}
};
return RateLimitGRPCV2BlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static RateLimitGRPCV2FutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RateLimitGRPCV2FutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitGRPCV2FutureStub(channel, callOptions);
}
};
return RateLimitGRPCV2FutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*
* 限流接口
*
*/
default io.grpc.stub.StreamObserver service(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getServiceMethod(), responseObserver);
}
/**
*
*时间对齐接口
*
*/
default void timeAdjust(com.tencent.polaris.ratelimit.client.pb.RatelimitV2.TimeAdjustRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTimeAdjustMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service RateLimitGRPCV2.
*/
public static abstract class RateLimitGRPCV2ImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return RateLimitGRPCV2Grpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service RateLimitGRPCV2.
*/
public static final class RateLimitGRPCV2Stub
extends io.grpc.stub.AbstractAsyncStub {
private RateLimitGRPCV2Stub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RateLimitGRPCV2Stub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitGRPCV2Stub(channel, callOptions);
}
/**
*
* 限流接口
*
*/
public io.grpc.stub.StreamObserver service(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
getChannel().newCall(getServiceMethod(), getCallOptions()), responseObserver);
}
/**
*
*时间对齐接口
*
*/
public void timeAdjust(com.tencent.polaris.ratelimit.client.pb.RatelimitV2.TimeAdjustRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getTimeAdjustMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service RateLimitGRPCV2.
*/
public static final class RateLimitGRPCV2BlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private RateLimitGRPCV2BlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RateLimitGRPCV2BlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitGRPCV2BlockingStub(channel, callOptions);
}
/**
*
*时间对齐接口
*
*/
public com.tencent.polaris.ratelimit.client.pb.RatelimitV2.TimeAdjustResponse timeAdjust(com.tencent.polaris.ratelimit.client.pb.RatelimitV2.TimeAdjustRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getTimeAdjustMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service RateLimitGRPCV2.
*/
public static final class RateLimitGRPCV2FutureStub
extends io.grpc.stub.AbstractFutureStub {
private RateLimitGRPCV2FutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RateLimitGRPCV2FutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitGRPCV2FutureStub(channel, callOptions);
}
/**
*
*时间对齐接口
*
*/
public com.google.common.util.concurrent.ListenableFuture timeAdjust(
com.tencent.polaris.ratelimit.client.pb.RatelimitV2.TimeAdjustRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getTimeAdjustMethod(), getCallOptions()), request);
}
}
private static final int METHODID_TIME_ADJUST = 0;
private static final int METHODID_SERVICE = 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_TIME_ADJUST:
serviceImpl.timeAdjust((com.tencent.polaris.ratelimit.client.pb.RatelimitV2.TimeAdjustRequest) 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_SERVICE:
return (io.grpc.stub.StreamObserver) serviceImpl.service(
(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(
getServiceMethod(),
io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
new MethodHandlers<
com.tencent.polaris.ratelimit.client.pb.RatelimitV2.RateLimitRequest,
com.tencent.polaris.ratelimit.client.pb.RatelimitV2.RateLimitResponse>(
service, METHODID_SERVICE)))
.addMethod(
getTimeAdjustMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.tencent.polaris.ratelimit.client.pb.RatelimitV2.TimeAdjustRequest,
com.tencent.polaris.ratelimit.client.pb.RatelimitV2.TimeAdjustResponse>(
service, METHODID_TIME_ADJUST)))
.build();
}
private static abstract class RateLimitGRPCV2BaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
RateLimitGRPCV2BaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.tencent.polaris.ratelimit.client.pb.GrpcapiV2Metric.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("RateLimitGRPCV2");
}
}
private static final class RateLimitGRPCV2FileDescriptorSupplier
extends RateLimitGRPCV2BaseDescriptorSupplier {
RateLimitGRPCV2FileDescriptorSupplier() {}
}
private static final class RateLimitGRPCV2MethodDescriptorSupplier
extends RateLimitGRPCV2BaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
RateLimitGRPCV2MethodDescriptorSupplier(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 (RateLimitGRPCV2Grpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new RateLimitGRPCV2FileDescriptorSupplier())
.addMethod(getServiceMethod())
.addMethod(getTimeAdjustMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy