All Downloads are FREE. Search and download functionalities are using the official Maven repository.

binlog.CisternGrpc Maven / Gradle / Ivy

package binlog;

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;

/**
 * 
 * Interfaces exported by CisternServer.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.4.0)", comments = "Source: binlog/cistern.proto") public final class CisternGrpc { private CisternGrpc() {} public static final String SERVICE_NAME = "binlog.Cistern"; // 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_DUMP_BINLOG = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) .setFullMethodName(generateFullMethodName( "binlog.Cistern", "DumpBinlog")) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( binlog.CisternOuterClass.DumpBinlogReq.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( binlog.CisternOuterClass.DumpBinlogResp.getDefaultInstance())) .build(); @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static final io.grpc.MethodDescriptor METHOD_DUMP_DDLJOBS = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( "binlog.Cistern", "DumpDDLJobs")) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( binlog.CisternOuterClass.DumpDDLJobsReq.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( binlog.CisternOuterClass.DumpDDLJobsResp.getDefaultInstance())) .build(); @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static final io.grpc.MethodDescriptor METHOD_NOTIFY = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( "binlog.Cistern", "Notify")) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( binlog.CisternOuterClass.NotifyReq.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( binlog.CisternOuterClass.NotifyResp.getDefaultInstance())) .build(); /** * Creates a new async stub that supports all call types for the service */ public static CisternStub newStub(io.grpc.Channel channel) { return new CisternStub(channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static CisternBlockingStub newBlockingStub( io.grpc.Channel channel) { return new CisternBlockingStub(channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static CisternFutureStub newFutureStub( io.grpc.Channel channel) { return new CisternFutureStub(channel); } /** *
   * Interfaces exported by CisternServer.
   * 
*/ public static abstract class CisternImplBase implements io.grpc.BindableService { /** *
     * DumpBinlog dumps continuous binlog items in a stream from a given position
     * 
*/ public void dumpBinlog(binlog.CisternOuterClass.DumpBinlogReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_DUMP_BINLOG, responseObserver); } /** *
     * DumpDDLJobs dumps all history DDL jobs before a specified commitTS
     * 
*/ public void dumpDDLJobs(binlog.CisternOuterClass.DumpDDLJobsReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_DUMP_DDLJOBS, responseObserver); } /** *
     * Notify notifies all living cisterns that a new pump is coming
     * the living cisterns can be queried from pd
     * 
*/ public void notify(binlog.CisternOuterClass.NotifyReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_NOTIFY, responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( METHOD_DUMP_BINLOG, asyncServerStreamingCall( new MethodHandlers< binlog.CisternOuterClass.DumpBinlogReq, binlog.CisternOuterClass.DumpBinlogResp>( this, METHODID_DUMP_BINLOG))) .addMethod( METHOD_DUMP_DDLJOBS, asyncUnaryCall( new MethodHandlers< binlog.CisternOuterClass.DumpDDLJobsReq, binlog.CisternOuterClass.DumpDDLJobsResp>( this, METHODID_DUMP_DDLJOBS))) .addMethod( METHOD_NOTIFY, asyncUnaryCall( new MethodHandlers< binlog.CisternOuterClass.NotifyReq, binlog.CisternOuterClass.NotifyResp>( this, METHODID_NOTIFY))) .build(); } } /** *
   * Interfaces exported by CisternServer.
   * 
*/ public static final class CisternStub extends io.grpc.stub.AbstractStub { private CisternStub(io.grpc.Channel channel) { super(channel); } private CisternStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected CisternStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new CisternStub(channel, callOptions); } /** *
     * DumpBinlog dumps continuous binlog items in a stream from a given position
     * 
*/ public void dumpBinlog(binlog.CisternOuterClass.DumpBinlogReq request, io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( getChannel().newCall(METHOD_DUMP_BINLOG, getCallOptions()), request, responseObserver); } /** *
     * DumpDDLJobs dumps all history DDL jobs before a specified commitTS
     * 
*/ public void dumpDDLJobs(binlog.CisternOuterClass.DumpDDLJobsReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_DUMP_DDLJOBS, getCallOptions()), request, responseObserver); } /** *
     * Notify notifies all living cisterns that a new pump is coming
     * the living cisterns can be queried from pd
     * 
*/ public void notify(binlog.CisternOuterClass.NotifyReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_NOTIFY, getCallOptions()), request, responseObserver); } } /** *
   * Interfaces exported by CisternServer.
   * 
*/ public static final class CisternBlockingStub extends io.grpc.stub.AbstractStub { private CisternBlockingStub(io.grpc.Channel channel) { super(channel); } private CisternBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected CisternBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new CisternBlockingStub(channel, callOptions); } /** *
     * DumpBinlog dumps continuous binlog items in a stream from a given position
     * 
*/ public java.util.Iterator dumpBinlog( binlog.CisternOuterClass.DumpBinlogReq request) { return blockingServerStreamingCall( getChannel(), METHOD_DUMP_BINLOG, getCallOptions(), request); } /** *
     * DumpDDLJobs dumps all history DDL jobs before a specified commitTS
     * 
*/ public binlog.CisternOuterClass.DumpDDLJobsResp dumpDDLJobs(binlog.CisternOuterClass.DumpDDLJobsReq request) { return blockingUnaryCall( getChannel(), METHOD_DUMP_DDLJOBS, getCallOptions(), request); } /** *
     * Notify notifies all living cisterns that a new pump is coming
     * the living cisterns can be queried from pd
     * 
*/ public binlog.CisternOuterClass.NotifyResp notify(binlog.CisternOuterClass.NotifyReq request) { return blockingUnaryCall( getChannel(), METHOD_NOTIFY, getCallOptions(), request); } } /** *
   * Interfaces exported by CisternServer.
   * 
*/ public static final class CisternFutureStub extends io.grpc.stub.AbstractStub { private CisternFutureStub(io.grpc.Channel channel) { super(channel); } private CisternFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected CisternFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new CisternFutureStub(channel, callOptions); } /** *
     * DumpDDLJobs dumps all history DDL jobs before a specified commitTS
     * 
*/ public com.google.common.util.concurrent.ListenableFuture dumpDDLJobs( binlog.CisternOuterClass.DumpDDLJobsReq request) { return futureUnaryCall( getChannel().newCall(METHOD_DUMP_DDLJOBS, getCallOptions()), request); } /** *
     * Notify notifies all living cisterns that a new pump is coming
     * the living cisterns can be queried from pd
     * 
*/ public com.google.common.util.concurrent.ListenableFuture notify( binlog.CisternOuterClass.NotifyReq request) { return futureUnaryCall( getChannel().newCall(METHOD_NOTIFY, getCallOptions()), request); } } private static final int METHODID_DUMP_BINLOG = 0; private static final int METHODID_DUMP_DDLJOBS = 1; private static final int METHODID_NOTIFY = 2; 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 CisternImplBase serviceImpl; private final int methodId; MethodHandlers(CisternImplBase 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_DUMP_BINLOG: serviceImpl.dumpBinlog((binlog.CisternOuterClass.DumpBinlogReq) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_DUMP_DDLJOBS: serviceImpl.dumpDDLJobs((binlog.CisternOuterClass.DumpDDLJobsReq) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_NOTIFY: serviceImpl.notify((binlog.CisternOuterClass.NotifyReq) 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 CisternDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier { @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return binlog.CisternOuterClass.getDescriptor(); } } private static volatile io.grpc.ServiceDescriptor serviceDescriptor; public static io.grpc.ServiceDescriptor getServiceDescriptor() { io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { synchronized (CisternGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new CisternDescriptorSupplier()) .addMethod(METHOD_DUMP_BINLOG) .addMethod(METHOD_DUMP_DDLJOBS) .addMethod(METHOD_NOTIFY) .build(); } } } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy