tech.ydb.proto.monitoring.v1.MonitoringServiceGrpc Maven / Gradle / Ivy
package tech.ydb.proto.monitoring.v1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.59.1)",
comments = "Source: ydb_monitoring_v1.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class MonitoringServiceGrpc {
private MonitoringServiceGrpc() {}
public static final java.lang.String SERVICE_NAME = "Ydb.Monitoring.V1.MonitoringService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getSelfCheckMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "SelfCheck",
requestType = tech.ydb.proto.monitoring.MonitoringProtos.SelfCheckRequest.class,
responseType = tech.ydb.proto.monitoring.MonitoringProtos.SelfCheckResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getSelfCheckMethod() {
io.grpc.MethodDescriptor getSelfCheckMethod;
if ((getSelfCheckMethod = MonitoringServiceGrpc.getSelfCheckMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getSelfCheckMethod = MonitoringServiceGrpc.getSelfCheckMethod) == null) {
MonitoringServiceGrpc.getSelfCheckMethod = getSelfCheckMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelfCheck"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.monitoring.MonitoringProtos.SelfCheckRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.monitoring.MonitoringProtos.SelfCheckResponse.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SelfCheck"))
.build();
}
}
}
return getSelfCheckMethod;
}
private static volatile io.grpc.MethodDescriptor getNodeCheckMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "NodeCheck",
requestType = tech.ydb.proto.monitoring.MonitoringProtos.NodeCheckRequest.class,
responseType = tech.ydb.proto.monitoring.MonitoringProtos.NodeCheckResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getNodeCheckMethod() {
io.grpc.MethodDescriptor getNodeCheckMethod;
if ((getNodeCheckMethod = MonitoringServiceGrpc.getNodeCheckMethod) == null) {
synchronized (MonitoringServiceGrpc.class) {
if ((getNodeCheckMethod = MonitoringServiceGrpc.getNodeCheckMethod) == null) {
MonitoringServiceGrpc.getNodeCheckMethod = getNodeCheckMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "NodeCheck"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.monitoring.MonitoringProtos.NodeCheckRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.monitoring.MonitoringProtos.NodeCheckResponse.getDefaultInstance()))
.setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("NodeCheck"))
.build();
}
}
}
return getNodeCheckMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static MonitoringServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MonitoringServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MonitoringServiceStub(channel, callOptions);
}
};
return MonitoringServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static MonitoringServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MonitoringServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MonitoringServiceBlockingStub(channel, callOptions);
}
};
return MonitoringServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static MonitoringServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MonitoringServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MonitoringServiceFutureStub(channel, callOptions);
}
};
return MonitoringServiceFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*
* Gets the health status of the database.
*
*/
default void selfCheck(tech.ydb.proto.monitoring.MonitoringProtos.SelfCheckRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelfCheckMethod(), responseObserver);
}
/**
*
* Checks current node health
*
*/
default void nodeCheck(tech.ydb.proto.monitoring.MonitoringProtos.NodeCheckRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getNodeCheckMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service MonitoringService.
*/
public static abstract class MonitoringServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return MonitoringServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service MonitoringService.
*/
public static final class MonitoringServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private MonitoringServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MonitoringServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MonitoringServiceStub(channel, callOptions);
}
/**
*
* Gets the health status of the database.
*
*/
public void selfCheck(tech.ydb.proto.monitoring.MonitoringProtos.SelfCheckRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getSelfCheckMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Checks current node health
*
*/
public void nodeCheck(tech.ydb.proto.monitoring.MonitoringProtos.NodeCheckRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getNodeCheckMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service MonitoringService.
*/
public static final class MonitoringServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private MonitoringServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MonitoringServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MonitoringServiceBlockingStub(channel, callOptions);
}
/**
*
* Gets the health status of the database.
*
*/
public tech.ydb.proto.monitoring.MonitoringProtos.SelfCheckResponse selfCheck(tech.ydb.proto.monitoring.MonitoringProtos.SelfCheckRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getSelfCheckMethod(), getCallOptions(), request);
}
/**
*
* Checks current node health
*
*/
public tech.ydb.proto.monitoring.MonitoringProtos.NodeCheckResponse nodeCheck(tech.ydb.proto.monitoring.MonitoringProtos.NodeCheckRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getNodeCheckMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service MonitoringService.
*/
public static final class MonitoringServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private MonitoringServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MonitoringServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MonitoringServiceFutureStub(channel, callOptions);
}
/**
*
* Gets the health status of the database.
*
*/
public com.google.common.util.concurrent.ListenableFuture selfCheck(
tech.ydb.proto.monitoring.MonitoringProtos.SelfCheckRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getSelfCheckMethod(), getCallOptions()), request);
}
/**
*
* Checks current node health
*
*/
public com.google.common.util.concurrent.ListenableFuture nodeCheck(
tech.ydb.proto.monitoring.MonitoringProtos.NodeCheckRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getNodeCheckMethod(), getCallOptions()), request);
}
}
private static final int METHODID_SELF_CHECK = 0;
private static final int METHODID_NODE_CHECK = 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_SELF_CHECK:
serviceImpl.selfCheck((tech.ydb.proto.monitoring.MonitoringProtos.SelfCheckRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_NODE_CHECK:
serviceImpl.nodeCheck((tech.ydb.proto.monitoring.MonitoringProtos.NodeCheckRequest) 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();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getSelfCheckMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
tech.ydb.proto.monitoring.MonitoringProtos.SelfCheckRequest,
tech.ydb.proto.monitoring.MonitoringProtos.SelfCheckResponse>(
service, METHODID_SELF_CHECK)))
.addMethod(
getNodeCheckMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
tech.ydb.proto.monitoring.MonitoringProtos.NodeCheckRequest,
tech.ydb.proto.monitoring.MonitoringProtos.NodeCheckResponse>(
service, METHODID_NODE_CHECK)))
.build();
}
private static abstract class MonitoringServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
MonitoringServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return tech.ydb.proto.monitoring.v1.YdbMonitoringV1.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("MonitoringService");
}
}
private static final class MonitoringServiceFileDescriptorSupplier
extends MonitoringServiceBaseDescriptorSupplier {
MonitoringServiceFileDescriptorSupplier() {}
}
private static final class MonitoringServiceMethodDescriptorSupplier
extends MonitoringServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
MonitoringServiceMethodDescriptorSupplier(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 (MonitoringServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new MonitoringServiceFileDescriptorSupplier())
.addMethod(getSelfCheckMethod())
.addMethod(getNodeCheckMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy