com.salesforce.reactivegrpc.jmh.proto.WorkerServiceGrpc Maven / Gradle / Ivy
package com.salesforce.reactivegrpc.jmh.proto;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.19.0)",
comments = "Source: grpc/testing/services.proto")
public final class WorkerServiceGrpc {
private WorkerServiceGrpc() {}
public static final String SERVICE_NAME = "grpc.testing.WorkerService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getRunServerMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "RunServer",
requestType = com.salesforce.reactivegrpc.jmh.proto.Control.ServerArgs.class,
responseType = com.salesforce.reactivegrpc.jmh.proto.Control.ServerStatus.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getRunServerMethod() {
io.grpc.MethodDescriptor getRunServerMethod;
if ((getRunServerMethod = WorkerServiceGrpc.getRunServerMethod) == null) {
synchronized (WorkerServiceGrpc.class) {
if ((getRunServerMethod = WorkerServiceGrpc.getRunServerMethod) == null) {
WorkerServiceGrpc.getRunServerMethod = getRunServerMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.WorkerService", "RunServer"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.salesforce.reactivegrpc.jmh.proto.Control.ServerArgs.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.salesforce.reactivegrpc.jmh.proto.Control.ServerStatus.getDefaultInstance()))
.setSchemaDescriptor(new WorkerServiceMethodDescriptorSupplier("RunServer"))
.build();
}
}
}
return getRunServerMethod;
}
private static volatile io.grpc.MethodDescriptor getRunClientMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "RunClient",
requestType = com.salesforce.reactivegrpc.jmh.proto.Control.ClientArgs.class,
responseType = com.salesforce.reactivegrpc.jmh.proto.Control.ClientStatus.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getRunClientMethod() {
io.grpc.MethodDescriptor getRunClientMethod;
if ((getRunClientMethod = WorkerServiceGrpc.getRunClientMethod) == null) {
synchronized (WorkerServiceGrpc.class) {
if ((getRunClientMethod = WorkerServiceGrpc.getRunClientMethod) == null) {
WorkerServiceGrpc.getRunClientMethod = getRunClientMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.WorkerService", "RunClient"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.salesforce.reactivegrpc.jmh.proto.Control.ClientArgs.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.salesforce.reactivegrpc.jmh.proto.Control.ClientStatus.getDefaultInstance()))
.setSchemaDescriptor(new WorkerServiceMethodDescriptorSupplier("RunClient"))
.build();
}
}
}
return getRunClientMethod;
}
private static volatile io.grpc.MethodDescriptor getCoreCountMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CoreCount",
requestType = com.salesforce.reactivegrpc.jmh.proto.Control.CoreRequest.class,
responseType = com.salesforce.reactivegrpc.jmh.proto.Control.CoreResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getCoreCountMethod() {
io.grpc.MethodDescriptor getCoreCountMethod;
if ((getCoreCountMethod = WorkerServiceGrpc.getCoreCountMethod) == null) {
synchronized (WorkerServiceGrpc.class) {
if ((getCoreCountMethod = WorkerServiceGrpc.getCoreCountMethod) == null) {
WorkerServiceGrpc.getCoreCountMethod = getCoreCountMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"grpc.testing.WorkerService", "CoreCount"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.salesforce.reactivegrpc.jmh.proto.Control.CoreRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.salesforce.reactivegrpc.jmh.proto.Control.CoreResponse.getDefaultInstance()))
.setSchemaDescriptor(new WorkerServiceMethodDescriptorSupplier("CoreCount"))
.build();
}
}
}
return getCoreCountMethod;
}
private static volatile io.grpc.MethodDescriptor getQuitWorkerMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "QuitWorker",
requestType = com.salesforce.reactivegrpc.jmh.proto.Control.Void.class,
responseType = com.salesforce.reactivegrpc.jmh.proto.Control.Void.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getQuitWorkerMethod() {
io.grpc.MethodDescriptor getQuitWorkerMethod;
if ((getQuitWorkerMethod = WorkerServiceGrpc.getQuitWorkerMethod) == null) {
synchronized (WorkerServiceGrpc.class) {
if ((getQuitWorkerMethod = WorkerServiceGrpc.getQuitWorkerMethod) == null) {
WorkerServiceGrpc.getQuitWorkerMethod = getQuitWorkerMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"grpc.testing.WorkerService", "QuitWorker"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.salesforce.reactivegrpc.jmh.proto.Control.Void.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.salesforce.reactivegrpc.jmh.proto.Control.Void.getDefaultInstance()))
.setSchemaDescriptor(new WorkerServiceMethodDescriptorSupplier("QuitWorker"))
.build();
}
}
}
return getQuitWorkerMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static WorkerServiceStub newStub(io.grpc.Channel channel) {
return new WorkerServiceStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static WorkerServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new WorkerServiceBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static WorkerServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
return new WorkerServiceFutureStub(channel);
}
/**
*/
public static abstract class WorkerServiceImplBase implements io.grpc.BindableService {
/**
*
* Start server with specified workload.
* First request sent specifies the ServerConfig followed by ServerStatus
* response. After that, a "Mark" can be sent anytime to request the latest
* stats. Closing the stream will initiate shutdown of the test server
* and once the shutdown has finished, the OK status is sent to terminate
* this RPC.
*
*/
public io.grpc.stub.StreamObserver runServer(
io.grpc.stub.StreamObserver responseObserver) {
return asyncUnimplementedStreamingCall(getRunServerMethod(), responseObserver);
}
/**
*
* Start client with specified workload.
* First request sent specifies the ClientConfig followed by ClientStatus
* response. After that, a "Mark" can be sent anytime to request the latest
* stats. Closing the stream will initiate shutdown of the test client
* and once the shutdown has finished, the OK status is sent to terminate
* this RPC.
*
*/
public io.grpc.stub.StreamObserver runClient(
io.grpc.stub.StreamObserver responseObserver) {
return asyncUnimplementedStreamingCall(getRunClientMethod(), responseObserver);
}
/**
*
* Just return the core count - unary call
*
*/
public void coreCount(com.salesforce.reactivegrpc.jmh.proto.Control.CoreRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getCoreCountMethod(), responseObserver);
}
/**
*
* Quit this worker
*
*/
public void quitWorker(com.salesforce.reactivegrpc.jmh.proto.Control.Void request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getQuitWorkerMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getRunServerMethod(),
asyncBidiStreamingCall(
new MethodHandlers<
com.salesforce.reactivegrpc.jmh.proto.Control.ServerArgs,
com.salesforce.reactivegrpc.jmh.proto.Control.ServerStatus>(
this, METHODID_RUN_SERVER)))
.addMethod(
getRunClientMethod(),
asyncBidiStreamingCall(
new MethodHandlers<
com.salesforce.reactivegrpc.jmh.proto.Control.ClientArgs,
com.salesforce.reactivegrpc.jmh.proto.Control.ClientStatus>(
this, METHODID_RUN_CLIENT)))
.addMethod(
getCoreCountMethod(),
asyncUnaryCall(
new MethodHandlers<
com.salesforce.reactivegrpc.jmh.proto.Control.CoreRequest,
com.salesforce.reactivegrpc.jmh.proto.Control.CoreResponse>(
this, METHODID_CORE_COUNT)))
.addMethod(
getQuitWorkerMethod(),
asyncUnaryCall(
new MethodHandlers<
com.salesforce.reactivegrpc.jmh.proto.Control.Void,
com.salesforce.reactivegrpc.jmh.proto.Control.Void>(
this, METHODID_QUIT_WORKER)))
.build();
}
}
/**
*/
public static final class WorkerServiceStub extends io.grpc.stub.AbstractStub {
private WorkerServiceStub(io.grpc.Channel channel) {
super(channel);
}
private WorkerServiceStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected WorkerServiceStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new WorkerServiceStub(channel, callOptions);
}
/**
*
* Start server with specified workload.
* First request sent specifies the ServerConfig followed by ServerStatus
* response. After that, a "Mark" can be sent anytime to request the latest
* stats. Closing the stream will initiate shutdown of the test server
* and once the shutdown has finished, the OK status is sent to terminate
* this RPC.
*
*/
public io.grpc.stub.StreamObserver runServer(
io.grpc.stub.StreamObserver responseObserver) {
return asyncBidiStreamingCall(
getChannel().newCall(getRunServerMethod(), getCallOptions()), responseObserver);
}
/**
*
* Start client with specified workload.
* First request sent specifies the ClientConfig followed by ClientStatus
* response. After that, a "Mark" can be sent anytime to request the latest
* stats. Closing the stream will initiate shutdown of the test client
* and once the shutdown has finished, the OK status is sent to terminate
* this RPC.
*
*/
public io.grpc.stub.StreamObserver runClient(
io.grpc.stub.StreamObserver responseObserver) {
return asyncBidiStreamingCall(
getChannel().newCall(getRunClientMethod(), getCallOptions()), responseObserver);
}
/**
*
* Just return the core count - unary call
*
*/
public void coreCount(com.salesforce.reactivegrpc.jmh.proto.Control.CoreRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getCoreCountMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Quit this worker
*
*/
public void quitWorker(com.salesforce.reactivegrpc.jmh.proto.Control.Void request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getQuitWorkerMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class WorkerServiceBlockingStub extends io.grpc.stub.AbstractStub {
private WorkerServiceBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private WorkerServiceBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected WorkerServiceBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new WorkerServiceBlockingStub(channel, callOptions);
}
/**
*
* Just return the core count - unary call
*
*/
public com.salesforce.reactivegrpc.jmh.proto.Control.CoreResponse coreCount(com.salesforce.reactivegrpc.jmh.proto.Control.CoreRequest request) {
return blockingUnaryCall(
getChannel(), getCoreCountMethod(), getCallOptions(), request);
}
/**
*
* Quit this worker
*
*/
public com.salesforce.reactivegrpc.jmh.proto.Control.Void quitWorker(com.salesforce.reactivegrpc.jmh.proto.Control.Void request) {
return blockingUnaryCall(
getChannel(), getQuitWorkerMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class WorkerServiceFutureStub extends io.grpc.stub.AbstractStub {
private WorkerServiceFutureStub(io.grpc.Channel channel) {
super(channel);
}
private WorkerServiceFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected WorkerServiceFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new WorkerServiceFutureStub(channel, callOptions);
}
/**
*
* Just return the core count - unary call
*
*/
public com.google.common.util.concurrent.ListenableFuture coreCount(
com.salesforce.reactivegrpc.jmh.proto.Control.CoreRequest request) {
return futureUnaryCall(
getChannel().newCall(getCoreCountMethod(), getCallOptions()), request);
}
/**
*
* Quit this worker
*
*/
public com.google.common.util.concurrent.ListenableFuture quitWorker(
com.salesforce.reactivegrpc.jmh.proto.Control.Void request) {
return futureUnaryCall(
getChannel().newCall(getQuitWorkerMethod(), getCallOptions()), request);
}
}
private static final int METHODID_CORE_COUNT = 0;
private static final int METHODID_QUIT_WORKER = 1;
private static final int METHODID_RUN_SERVER = 2;
private static final int METHODID_RUN_CLIENT = 3;
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 WorkerServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(WorkerServiceImplBase 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_CORE_COUNT:
serviceImpl.coreCount((com.salesforce.reactivegrpc.jmh.proto.Control.CoreRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_QUIT_WORKER:
serviceImpl.quitWorker((com.salesforce.reactivegrpc.jmh.proto.Control.Void) 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_RUN_SERVER:
return (io.grpc.stub.StreamObserver) serviceImpl.runServer(
(io.grpc.stub.StreamObserver) responseObserver);
case METHODID_RUN_CLIENT:
return (io.grpc.stub.StreamObserver) serviceImpl.runClient(
(io.grpc.stub.StreamObserver) responseObserver);
default:
throw new AssertionError();
}
}
}
private static abstract class WorkerServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
WorkerServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.salesforce.reactivegrpc.jmh.proto.Services.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("WorkerService");
}
}
private static final class WorkerServiceFileDescriptorSupplier
extends WorkerServiceBaseDescriptorSupplier {
WorkerServiceFileDescriptorSupplier() {}
}
private static final class WorkerServiceMethodDescriptorSupplier
extends WorkerServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
WorkerServiceMethodDescriptorSupplier(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 (WorkerServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new WorkerServiceFileDescriptorSupplier())
.addMethod(getRunServerMethod())
.addMethod(getRunClientMethod())
.addMethod(getCoreCountMethod())
.addMethod(getQuitWorkerMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy