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

com.hedera.hapi.block.protoc.StateServiceGrpc Maven / Gradle / Ivy

There is a newer version: 0.57.1
Show newest version
package com.hedera.hapi.block.protoc;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 **
 * Remote procedure calls (RPCs) for the Block Node state snapshot
 * and query services.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.45.1)", comments = "Source: block_service.proto") @io.grpc.stub.annotations.GrpcGenerated public final class StateServiceGrpc { private StateServiceGrpc() {} public static final String SERVICE_NAME = "com.hedera.hapi.block.StateService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getStateSnapshotMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "stateSnapshot", requestType = com.hedera.hapi.block.protoc.StateSnapshotRequest.class, responseType = com.hedera.hapi.block.protoc.StateSnapshotResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getStateSnapshotMethod() { io.grpc.MethodDescriptor getStateSnapshotMethod; if ((getStateSnapshotMethod = StateServiceGrpc.getStateSnapshotMethod) == null) { synchronized (StateServiceGrpc.class) { if ((getStateSnapshotMethod = StateServiceGrpc.getStateSnapshotMethod) == null) { StateServiceGrpc.getStateSnapshotMethod = getStateSnapshotMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "stateSnapshot")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.hedera.hapi.block.protoc.StateSnapshotRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.hedera.hapi.block.protoc.StateSnapshotResponse.getDefaultInstance())) .setSchemaDescriptor(new StateServiceMethodDescriptorSupplier("stateSnapshot")) .build(); } } } return getStateSnapshotMethod; } /** * Creates a new async stub that supports all call types for the service */ public static StateServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public StateServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new StateServiceStub(channel, callOptions); } }; return StateServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static StateServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public StateServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new StateServiceBlockingStub(channel, callOptions); } }; return StateServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static StateServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public StateServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new StateServiceFutureStub(channel, callOptions); } }; return StateServiceFutureStub.newStub(factory, channel); } /** *
   **
   * Remote procedure calls (RPCs) for the Block Node state snapshot
   * and query services.
   * 
*/ public static abstract class StateServiceImplBase implements io.grpc.BindableService { /** *
     **
     * Read a state snapshot from the block node.
     * <p>
     * The request SHALL describe the last block number present in the
     * snapshot.<br/>
     * Block node implementations MAY decline a request for a snapshot older
     * than the latest available, but MUST clearly document this behavior.
     * 
*/ public void stateSnapshot(com.hedera.hapi.block.protoc.StateSnapshotRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStateSnapshotMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getStateSnapshotMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.hedera.hapi.block.protoc.StateSnapshotRequest, com.hedera.hapi.block.protoc.StateSnapshotResponse>( this, METHODID_STATE_SNAPSHOT))) .build(); } } /** *
   **
   * Remote procedure calls (RPCs) for the Block Node state snapshot
   * and query services.
   * 
*/ public static final class StateServiceStub extends io.grpc.stub.AbstractAsyncStub { private StateServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected StateServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new StateServiceStub(channel, callOptions); } /** *
     **
     * Read a state snapshot from the block node.
     * <p>
     * The request SHALL describe the last block number present in the
     * snapshot.<br/>
     * Block node implementations MAY decline a request for a snapshot older
     * than the latest available, but MUST clearly document this behavior.
     * 
*/ public void stateSnapshot(com.hedera.hapi.block.protoc.StateSnapshotRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getStateSnapshotMethod(), getCallOptions()), request, responseObserver); } } /** *
   **
   * Remote procedure calls (RPCs) for the Block Node state snapshot
   * and query services.
   * 
*/ public static final class StateServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private StateServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected StateServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new StateServiceBlockingStub(channel, callOptions); } /** *
     **
     * Read a state snapshot from the block node.
     * <p>
     * The request SHALL describe the last block number present in the
     * snapshot.<br/>
     * Block node implementations MAY decline a request for a snapshot older
     * than the latest available, but MUST clearly document this behavior.
     * 
*/ public com.hedera.hapi.block.protoc.StateSnapshotResponse stateSnapshot(com.hedera.hapi.block.protoc.StateSnapshotRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getStateSnapshotMethod(), getCallOptions(), request); } } /** *
   **
   * Remote procedure calls (RPCs) for the Block Node state snapshot
   * and query services.
   * 
*/ public static final class StateServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private StateServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected StateServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new StateServiceFutureStub(channel, callOptions); } /** *
     **
     * Read a state snapshot from the block node.
     * <p>
     * The request SHALL describe the last block number present in the
     * snapshot.<br/>
     * Block node implementations MAY decline a request for a snapshot older
     * than the latest available, but MUST clearly document this behavior.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture stateSnapshot( com.hedera.hapi.block.protoc.StateSnapshotRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getStateSnapshotMethod(), getCallOptions()), request); } } private static final int METHODID_STATE_SNAPSHOT = 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 StateServiceImplBase serviceImpl; private final int methodId; MethodHandlers(StateServiceImplBase 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_STATE_SNAPSHOT: serviceImpl.stateSnapshot((com.hedera.hapi.block.protoc.StateSnapshotRequest) 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 StateServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { StateServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return com.hedera.hapi.block.protoc.BlockService.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("StateService"); } } private static final class StateServiceFileDescriptorSupplier extends StateServiceBaseDescriptorSupplier { StateServiceFileDescriptorSupplier() {} } private static final class StateServiceMethodDescriptorSupplier extends StateServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; StateServiceMethodDescriptorSupplier(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 (StateServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new StateServiceFileDescriptorSupplier()) .addMethod(getStateSnapshotMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy