com.netflix.genie.proto.JobKillServiceGrpc Maven / Gradle / Ivy
The newest version!
package com.netflix.genie.proto;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.38.1)",
comments = "Source: genie.proto")
public final class JobKillServiceGrpc {
private JobKillServiceGrpc() {}
public static final String SERVICE_NAME = "com.netflix.genie.proto.JobKillService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getRegisterForKillNotificationMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "registerForKillNotification",
requestType = com.netflix.genie.proto.JobKillRegistrationRequest.class,
responseType = com.netflix.genie.proto.JobKillRegistrationResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getRegisterForKillNotificationMethod() {
io.grpc.MethodDescriptor getRegisterForKillNotificationMethod;
if ((getRegisterForKillNotificationMethod = JobKillServiceGrpc.getRegisterForKillNotificationMethod) == null) {
synchronized (JobKillServiceGrpc.class) {
if ((getRegisterForKillNotificationMethod = JobKillServiceGrpc.getRegisterForKillNotificationMethod) == null) {
JobKillServiceGrpc.getRegisterForKillNotificationMethod = getRegisterForKillNotificationMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "registerForKillNotification"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.netflix.genie.proto.JobKillRegistrationRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.netflix.genie.proto.JobKillRegistrationResponse.getDefaultInstance()))
.setSchemaDescriptor(new JobKillServiceMethodDescriptorSupplier("registerForKillNotification"))
.build();
}
}
}
return getRegisterForKillNotificationMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static JobKillServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public JobKillServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new JobKillServiceStub(channel, callOptions);
}
};
return JobKillServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static JobKillServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public JobKillServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new JobKillServiceBlockingStub(channel, callOptions);
}
};
return JobKillServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static JobKillServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public JobKillServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new JobKillServiceFutureStub(channel, callOptions);
}
};
return JobKillServiceFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class JobKillServiceImplBase implements io.grpc.BindableService {
/**
*/
public void registerForKillNotification(com.netflix.genie.proto.JobKillRegistrationRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRegisterForKillNotificationMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getRegisterForKillNotificationMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.netflix.genie.proto.JobKillRegistrationRequest,
com.netflix.genie.proto.JobKillRegistrationResponse>(
this, METHODID_REGISTER_FOR_KILL_NOTIFICATION)))
.build();
}
}
/**
*/
public static final class JobKillServiceStub extends io.grpc.stub.AbstractAsyncStub {
private JobKillServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected JobKillServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new JobKillServiceStub(channel, callOptions);
}
/**
*/
public void registerForKillNotification(com.netflix.genie.proto.JobKillRegistrationRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getRegisterForKillNotificationMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class JobKillServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private JobKillServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected JobKillServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new JobKillServiceBlockingStub(channel, callOptions);
}
/**
*/
public com.netflix.genie.proto.JobKillRegistrationResponse registerForKillNotification(com.netflix.genie.proto.JobKillRegistrationRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getRegisterForKillNotificationMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class JobKillServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
private JobKillServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected JobKillServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new JobKillServiceFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture registerForKillNotification(
com.netflix.genie.proto.JobKillRegistrationRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getRegisterForKillNotificationMethod(), getCallOptions()), request);
}
}
private static final int METHODID_REGISTER_FOR_KILL_NOTIFICATION = 0;
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 JobKillServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(JobKillServiceImplBase 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_REGISTER_FOR_KILL_NOTIFICATION:
serviceImpl.registerForKillNotification((com.netflix.genie.proto.JobKillRegistrationRequest) 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 JobKillServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
JobKillServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.netflix.genie.proto.GenieProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("JobKillService");
}
}
private static final class JobKillServiceFileDescriptorSupplier
extends JobKillServiceBaseDescriptorSupplier {
JobKillServiceFileDescriptorSupplier() {}
}
private static final class JobKillServiceMethodDescriptorSupplier
extends JobKillServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
JobKillServiceMethodDescriptorSupplier(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 (JobKillServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new JobKillServiceFileDescriptorSupplier())
.addMethod(getRegisterForKillNotificationMethod())
.build();
}
}
}
return result;
}
}