Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.srotya.minuteman.rpc.ReplicationServiceGrpc Maven / Gradle / Ivy
package com.srotya.minuteman.rpc;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.2.0)",
comments = "Source: cluster.proto")
public final class ReplicationServiceGrpc {
private ReplicationServiceGrpc() {}
public static final String SERVICE_NAME = "rpcs.ReplicationService";
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_REQUEST_BATCH_REPLICATION =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"rpcs.ReplicationService", "RequestBatchReplication"),
io.grpc.protobuf.ProtoUtils.marshaller(com.srotya.minuteman.rpc.BatchDataRequest.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(com.srotya.minuteman.rpc.BatchDataResponse.getDefaultInstance()));
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_WRITE_DATA =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"rpcs.ReplicationService", "WriteData"),
io.grpc.protobuf.ProtoUtils.marshaller(com.srotya.minuteman.rpc.DataRequest.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(com.srotya.minuteman.rpc.GenericResponse.getDefaultInstance()));
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_ADD_ROUTE =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"rpcs.ReplicationService", "AddRoute"),
io.grpc.protobuf.ProtoUtils.marshaller(com.srotya.minuteman.rpc.RouteRequest.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(com.srotya.minuteman.rpc.RouteResponse.getDefaultInstance()));
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_ADD_REPLICA =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"rpcs.ReplicationService", "AddReplica"),
io.grpc.protobuf.ProtoUtils.marshaller(com.srotya.minuteman.rpc.ReplicaRequest.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(com.srotya.minuteman.rpc.GenericResponse.getDefaultInstance()));
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_UPDATE_ISR =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"rpcs.ReplicationService", "UpdateIsr"),
io.grpc.protobuf.ProtoUtils.marshaller(com.srotya.minuteman.rpc.IsrUpdateRequest.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(com.srotya.minuteman.rpc.GenericResponse.getDefaultInstance()));
/**
* Creates a new async stub that supports all call types for the service
*/
public static ReplicationServiceStub newStub(io.grpc.Channel channel) {
return new ReplicationServiceStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ReplicationServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new ReplicationServiceBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
*/
public static ReplicationServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
return new ReplicationServiceFutureStub(channel);
}
/**
*/
public static abstract class ReplicationServiceImplBase implements io.grpc.BindableService {
/**
*/
public void requestBatchReplication(com.srotya.minuteman.rpc.BatchDataRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_REQUEST_BATCH_REPLICATION, responseObserver);
}
/**
*/
public void writeData(com.srotya.minuteman.rpc.DataRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_WRITE_DATA, responseObserver);
}
/**
*/
public void addRoute(com.srotya.minuteman.rpc.RouteRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_ADD_ROUTE, responseObserver);
}
/**
*/
public void addReplica(com.srotya.minuteman.rpc.ReplicaRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_ADD_REPLICA, responseObserver);
}
/**
*/
public void updateIsr(com.srotya.minuteman.rpc.IsrUpdateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_UPDATE_ISR, responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
METHOD_REQUEST_BATCH_REPLICATION,
asyncUnaryCall(
new MethodHandlers<
com.srotya.minuteman.rpc.BatchDataRequest,
com.srotya.minuteman.rpc.BatchDataResponse>(
this, METHODID_REQUEST_BATCH_REPLICATION)))
.addMethod(
METHOD_WRITE_DATA,
asyncUnaryCall(
new MethodHandlers<
com.srotya.minuteman.rpc.DataRequest,
com.srotya.minuteman.rpc.GenericResponse>(
this, METHODID_WRITE_DATA)))
.addMethod(
METHOD_ADD_ROUTE,
asyncUnaryCall(
new MethodHandlers<
com.srotya.minuteman.rpc.RouteRequest,
com.srotya.minuteman.rpc.RouteResponse>(
this, METHODID_ADD_ROUTE)))
.addMethod(
METHOD_ADD_REPLICA,
asyncUnaryCall(
new MethodHandlers<
com.srotya.minuteman.rpc.ReplicaRequest,
com.srotya.minuteman.rpc.GenericResponse>(
this, METHODID_ADD_REPLICA)))
.addMethod(
METHOD_UPDATE_ISR,
asyncUnaryCall(
new MethodHandlers<
com.srotya.minuteman.rpc.IsrUpdateRequest,
com.srotya.minuteman.rpc.GenericResponse>(
this, METHODID_UPDATE_ISR)))
.build();
}
}
/**
*/
public static final class ReplicationServiceStub extends io.grpc.stub.AbstractStub {
private ReplicationServiceStub(io.grpc.Channel channel) {
super(channel);
}
private ReplicationServiceStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ReplicationServiceStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new ReplicationServiceStub(channel, callOptions);
}
/**
*/
public void requestBatchReplication(com.srotya.minuteman.rpc.BatchDataRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_REQUEST_BATCH_REPLICATION, getCallOptions()), request, responseObserver);
}
/**
*/
public void writeData(com.srotya.minuteman.rpc.DataRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_WRITE_DATA, getCallOptions()), request, responseObserver);
}
/**
*/
public void addRoute(com.srotya.minuteman.rpc.RouteRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_ADD_ROUTE, getCallOptions()), request, responseObserver);
}
/**
*/
public void addReplica(com.srotya.minuteman.rpc.ReplicaRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_ADD_REPLICA, getCallOptions()), request, responseObserver);
}
/**
*/
public void updateIsr(com.srotya.minuteman.rpc.IsrUpdateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_UPDATE_ISR, getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class ReplicationServiceBlockingStub extends io.grpc.stub.AbstractStub {
private ReplicationServiceBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private ReplicationServiceBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ReplicationServiceBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new ReplicationServiceBlockingStub(channel, callOptions);
}
/**
*/
public com.srotya.minuteman.rpc.BatchDataResponse requestBatchReplication(com.srotya.minuteman.rpc.BatchDataRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_REQUEST_BATCH_REPLICATION, getCallOptions(), request);
}
/**
*/
public com.srotya.minuteman.rpc.GenericResponse writeData(com.srotya.minuteman.rpc.DataRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_WRITE_DATA, getCallOptions(), request);
}
/**
*/
public com.srotya.minuteman.rpc.RouteResponse addRoute(com.srotya.minuteman.rpc.RouteRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_ADD_ROUTE, getCallOptions(), request);
}
/**
*/
public com.srotya.minuteman.rpc.GenericResponse addReplica(com.srotya.minuteman.rpc.ReplicaRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_ADD_REPLICA, getCallOptions(), request);
}
/**
*/
public com.srotya.minuteman.rpc.GenericResponse updateIsr(com.srotya.minuteman.rpc.IsrUpdateRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_UPDATE_ISR, getCallOptions(), request);
}
}
/**
*/
public static final class ReplicationServiceFutureStub extends io.grpc.stub.AbstractStub {
private ReplicationServiceFutureStub(io.grpc.Channel channel) {
super(channel);
}
private ReplicationServiceFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ReplicationServiceFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new ReplicationServiceFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture requestBatchReplication(
com.srotya.minuteman.rpc.BatchDataRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_REQUEST_BATCH_REPLICATION, getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture writeData(
com.srotya.minuteman.rpc.DataRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_WRITE_DATA, getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture addRoute(
com.srotya.minuteman.rpc.RouteRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_ADD_ROUTE, getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture addReplica(
com.srotya.minuteman.rpc.ReplicaRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_ADD_REPLICA, getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture updateIsr(
com.srotya.minuteman.rpc.IsrUpdateRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_UPDATE_ISR, getCallOptions()), request);
}
}
private static final int METHODID_REQUEST_BATCH_REPLICATION = 0;
private static final int METHODID_WRITE_DATA = 1;
private static final int METHODID_ADD_ROUTE = 2;
private static final int METHODID_ADD_REPLICA = 3;
private static final int METHODID_UPDATE_ISR = 4;
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 ReplicationServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(ReplicationServiceImplBase 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_REQUEST_BATCH_REPLICATION:
serviceImpl.requestBatchReplication((com.srotya.minuteman.rpc.BatchDataRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_WRITE_DATA:
serviceImpl.writeData((com.srotya.minuteman.rpc.DataRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_ADD_ROUTE:
serviceImpl.addRoute((com.srotya.minuteman.rpc.RouteRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_ADD_REPLICA:
serviceImpl.addReplica((com.srotya.minuteman.rpc.ReplicaRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_UPDATE_ISR:
serviceImpl.updateIsr((com.srotya.minuteman.rpc.IsrUpdateRequest) 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 final class ReplicationServiceDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.srotya.minuteman.rpc.Cluster.getDescriptor();
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (ReplicationServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new ReplicationServiceDescriptorSupplier())
.addMethod(METHOD_REQUEST_BATCH_REPLICATION)
.addMethod(METHOD_WRITE_DATA)
.addMethod(METHOD_ADD_ROUTE)
.addMethod(METHOD_ADD_REPLICA)
.addMethod(METHOD_UPDATE_ISR)
.build();
}
}
}
return result;
}
}