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

com.daml.ledger.api.v2.StateServiceGrpc Maven / Gradle / Ivy

package com.daml.ledger.api.v2;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * Allows clients to get state from the ledger.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: com/daml/ledger/api/v2/state_service.proto") @io.grpc.stub.annotations.GrpcGenerated public final class StateServiceGrpc { private StateServiceGrpc() {} public static final String SERVICE_NAME = "com.daml.ledger.api.v2.StateService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getGetActiveContractsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetActiveContracts", requestType = com.daml.ledger.api.v2.StateServiceOuterClass.GetActiveContractsRequest.class, responseType = com.daml.ledger.api.v2.StateServiceOuterClass.GetActiveContractsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) public static io.grpc.MethodDescriptor getGetActiveContractsMethod() { io.grpc.MethodDescriptor getGetActiveContractsMethod; if ((getGetActiveContractsMethod = StateServiceGrpc.getGetActiveContractsMethod) == null) { synchronized (StateServiceGrpc.class) { if ((getGetActiveContractsMethod = StateServiceGrpc.getGetActiveContractsMethod) == null) { StateServiceGrpc.getGetActiveContractsMethod = getGetActiveContractsMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetActiveContracts")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.daml.ledger.api.v2.StateServiceOuterClass.GetActiveContractsRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.daml.ledger.api.v2.StateServiceOuterClass.GetActiveContractsResponse.getDefaultInstance())) .setSchemaDescriptor(new StateServiceMethodDescriptorSupplier("GetActiveContracts")) .build(); } } } return getGetActiveContractsMethod; } private static volatile io.grpc.MethodDescriptor getGetConnectedDomainsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetConnectedDomains", requestType = com.daml.ledger.api.v2.StateServiceOuterClass.GetConnectedDomainsRequest.class, responseType = com.daml.ledger.api.v2.StateServiceOuterClass.GetConnectedDomainsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetConnectedDomainsMethod() { io.grpc.MethodDescriptor getGetConnectedDomainsMethod; if ((getGetConnectedDomainsMethod = StateServiceGrpc.getGetConnectedDomainsMethod) == null) { synchronized (StateServiceGrpc.class) { if ((getGetConnectedDomainsMethod = StateServiceGrpc.getGetConnectedDomainsMethod) == null) { StateServiceGrpc.getGetConnectedDomainsMethod = getGetConnectedDomainsMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConnectedDomains")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.daml.ledger.api.v2.StateServiceOuterClass.GetConnectedDomainsRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.daml.ledger.api.v2.StateServiceOuterClass.GetConnectedDomainsResponse.getDefaultInstance())) .setSchemaDescriptor(new StateServiceMethodDescriptorSupplier("GetConnectedDomains")) .build(); } } } return getGetConnectedDomainsMethod; } private static volatile io.grpc.MethodDescriptor getGetLedgerEndMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetLedgerEnd", requestType = com.daml.ledger.api.v2.StateServiceOuterClass.GetLedgerEndRequest.class, responseType = com.daml.ledger.api.v2.StateServiceOuterClass.GetLedgerEndResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetLedgerEndMethod() { io.grpc.MethodDescriptor getGetLedgerEndMethod; if ((getGetLedgerEndMethod = StateServiceGrpc.getGetLedgerEndMethod) == null) { synchronized (StateServiceGrpc.class) { if ((getGetLedgerEndMethod = StateServiceGrpc.getGetLedgerEndMethod) == null) { StateServiceGrpc.getGetLedgerEndMethod = getGetLedgerEndMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLedgerEnd")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.daml.ledger.api.v2.StateServiceOuterClass.GetLedgerEndRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.daml.ledger.api.v2.StateServiceOuterClass.GetLedgerEndResponse.getDefaultInstance())) .setSchemaDescriptor(new StateServiceMethodDescriptorSupplier("GetLedgerEnd")) .build(); } } } return getGetLedgerEndMethod; } private static volatile io.grpc.MethodDescriptor getGetLatestPrunedOffsetsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetLatestPrunedOffsets", requestType = com.daml.ledger.api.v2.StateServiceOuterClass.GetLatestPrunedOffsetsRequest.class, responseType = com.daml.ledger.api.v2.StateServiceOuterClass.GetLatestPrunedOffsetsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetLatestPrunedOffsetsMethod() { io.grpc.MethodDescriptor getGetLatestPrunedOffsetsMethod; if ((getGetLatestPrunedOffsetsMethod = StateServiceGrpc.getGetLatestPrunedOffsetsMethod) == null) { synchronized (StateServiceGrpc.class) { if ((getGetLatestPrunedOffsetsMethod = StateServiceGrpc.getGetLatestPrunedOffsetsMethod) == null) { StateServiceGrpc.getGetLatestPrunedOffsetsMethod = getGetLatestPrunedOffsetsMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLatestPrunedOffsets")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.daml.ledger.api.v2.StateServiceOuterClass.GetLatestPrunedOffsetsRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.daml.ledger.api.v2.StateServiceOuterClass.GetLatestPrunedOffsetsResponse.getDefaultInstance())) .setSchemaDescriptor(new StateServiceMethodDescriptorSupplier("GetLatestPrunedOffsets")) .build(); } } } return getGetLatestPrunedOffsetsMethod; } /** * 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); } /** *
   * Allows clients to get state from the ledger.
   * 
*/ public static abstract class StateServiceImplBase implements io.grpc.BindableService { /** *
     * Returns a stream of the snapshot of the active contracts and incomplete reassignments at a ledger offset.
     * If there are no active contracts, the stream returns a single response message with the offset at which the snapshot has been taken.
     * Clients SHOULD use the offset in the last GetActiveContractsResponse message to continue streaming transactions with the update service.
     * Clients SHOULD NOT assume that the set of active contracts they receive reflects the state at the ledger end.
     * 
*/ public void getActiveContracts(com.daml.ledger.api.v2.StateServiceOuterClass.GetActiveContractsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetActiveContractsMethod(), responseObserver); } /** *
     * Get the list of connected domains at the time of the query.
     * 
*/ public void getConnectedDomains(com.daml.ledger.api.v2.StateServiceOuterClass.GetConnectedDomainsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConnectedDomainsMethod(), responseObserver); } /** *
     * Get the current ledger end.
     * Subscriptions started with the returned offset will serve events after this RPC was called.
     * 
*/ public void getLedgerEnd(com.daml.ledger.api.v2.StateServiceOuterClass.GetLedgerEndRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLedgerEndMethod(), responseObserver); } /** *
     * Get the latest successfully pruned ledger offsets
     * 
*/ public void getLatestPrunedOffsets(com.daml.ledger.api.v2.StateServiceOuterClass.GetLatestPrunedOffsetsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLatestPrunedOffsetsMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getGetActiveContractsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( new MethodHandlers< com.daml.ledger.api.v2.StateServiceOuterClass.GetActiveContractsRequest, com.daml.ledger.api.v2.StateServiceOuterClass.GetActiveContractsResponse>( this, METHODID_GET_ACTIVE_CONTRACTS))) .addMethod( getGetConnectedDomainsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.daml.ledger.api.v2.StateServiceOuterClass.GetConnectedDomainsRequest, com.daml.ledger.api.v2.StateServiceOuterClass.GetConnectedDomainsResponse>( this, METHODID_GET_CONNECTED_DOMAINS))) .addMethod( getGetLedgerEndMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.daml.ledger.api.v2.StateServiceOuterClass.GetLedgerEndRequest, com.daml.ledger.api.v2.StateServiceOuterClass.GetLedgerEndResponse>( this, METHODID_GET_LEDGER_END))) .addMethod( getGetLatestPrunedOffsetsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.daml.ledger.api.v2.StateServiceOuterClass.GetLatestPrunedOffsetsRequest, com.daml.ledger.api.v2.StateServiceOuterClass.GetLatestPrunedOffsetsResponse>( this, METHODID_GET_LATEST_PRUNED_OFFSETS))) .build(); } } /** *
   * Allows clients to get state from the ledger.
   * 
*/ 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); } /** *
     * Returns a stream of the snapshot of the active contracts and incomplete reassignments at a ledger offset.
     * If there are no active contracts, the stream returns a single response message with the offset at which the snapshot has been taken.
     * Clients SHOULD use the offset in the last GetActiveContractsResponse message to continue streaming transactions with the update service.
     * Clients SHOULD NOT assume that the set of active contracts they receive reflects the state at the ledger end.
     * 
*/ public void getActiveContracts(com.daml.ledger.api.v2.StateServiceOuterClass.GetActiveContractsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncServerStreamingCall( getChannel().newCall(getGetActiveContractsMethod(), getCallOptions()), request, responseObserver); } /** *
     * Get the list of connected domains at the time of the query.
     * 
*/ public void getConnectedDomains(com.daml.ledger.api.v2.StateServiceOuterClass.GetConnectedDomainsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetConnectedDomainsMethod(), getCallOptions()), request, responseObserver); } /** *
     * Get the current ledger end.
     * Subscriptions started with the returned offset will serve events after this RPC was called.
     * 
*/ public void getLedgerEnd(com.daml.ledger.api.v2.StateServiceOuterClass.GetLedgerEndRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetLedgerEndMethod(), getCallOptions()), request, responseObserver); } /** *
     * Get the latest successfully pruned ledger offsets
     * 
*/ public void getLatestPrunedOffsets(com.daml.ledger.api.v2.StateServiceOuterClass.GetLatestPrunedOffsetsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetLatestPrunedOffsetsMethod(), getCallOptions()), request, responseObserver); } } /** *
   * Allows clients to get state from the ledger.
   * 
*/ 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); } /** *
     * Returns a stream of the snapshot of the active contracts and incomplete reassignments at a ledger offset.
     * If there are no active contracts, the stream returns a single response message with the offset at which the snapshot has been taken.
     * Clients SHOULD use the offset in the last GetActiveContractsResponse message to continue streaming transactions with the update service.
     * Clients SHOULD NOT assume that the set of active contracts they receive reflects the state at the ledger end.
     * 
*/ public java.util.Iterator getActiveContracts( com.daml.ledger.api.v2.StateServiceOuterClass.GetActiveContractsRequest request) { return io.grpc.stub.ClientCalls.blockingServerStreamingCall( getChannel(), getGetActiveContractsMethod(), getCallOptions(), request); } /** *
     * Get the list of connected domains at the time of the query.
     * 
*/ public com.daml.ledger.api.v2.StateServiceOuterClass.GetConnectedDomainsResponse getConnectedDomains(com.daml.ledger.api.v2.StateServiceOuterClass.GetConnectedDomainsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetConnectedDomainsMethod(), getCallOptions(), request); } /** *
     * Get the current ledger end.
     * Subscriptions started with the returned offset will serve events after this RPC was called.
     * 
*/ public com.daml.ledger.api.v2.StateServiceOuterClass.GetLedgerEndResponse getLedgerEnd(com.daml.ledger.api.v2.StateServiceOuterClass.GetLedgerEndRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetLedgerEndMethod(), getCallOptions(), request); } /** *
     * Get the latest successfully pruned ledger offsets
     * 
*/ public com.daml.ledger.api.v2.StateServiceOuterClass.GetLatestPrunedOffsetsResponse getLatestPrunedOffsets(com.daml.ledger.api.v2.StateServiceOuterClass.GetLatestPrunedOffsetsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetLatestPrunedOffsetsMethod(), getCallOptions(), request); } } /** *
   * Allows clients to get state from the ledger.
   * 
*/ 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); } /** *
     * Get the list of connected domains at the time of the query.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture getConnectedDomains( com.daml.ledger.api.v2.StateServiceOuterClass.GetConnectedDomainsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetConnectedDomainsMethod(), getCallOptions()), request); } /** *
     * Get the current ledger end.
     * Subscriptions started with the returned offset will serve events after this RPC was called.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture getLedgerEnd( com.daml.ledger.api.v2.StateServiceOuterClass.GetLedgerEndRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetLedgerEndMethod(), getCallOptions()), request); } /** *
     * Get the latest successfully pruned ledger offsets
     * 
*/ public com.google.common.util.concurrent.ListenableFuture getLatestPrunedOffsets( com.daml.ledger.api.v2.StateServiceOuterClass.GetLatestPrunedOffsetsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetLatestPrunedOffsetsMethod(), getCallOptions()), request); } } private static final int METHODID_GET_ACTIVE_CONTRACTS = 0; private static final int METHODID_GET_CONNECTED_DOMAINS = 1; private static final int METHODID_GET_LEDGER_END = 2; private static final int METHODID_GET_LATEST_PRUNED_OFFSETS = 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 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_GET_ACTIVE_CONTRACTS: serviceImpl.getActiveContracts((com.daml.ledger.api.v2.StateServiceOuterClass.GetActiveContractsRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_CONNECTED_DOMAINS: serviceImpl.getConnectedDomains((com.daml.ledger.api.v2.StateServiceOuterClass.GetConnectedDomainsRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_LEDGER_END: serviceImpl.getLedgerEnd((com.daml.ledger.api.v2.StateServiceOuterClass.GetLedgerEndRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_LATEST_PRUNED_OFFSETS: serviceImpl.getLatestPrunedOffsets((com.daml.ledger.api.v2.StateServiceOuterClass.GetLatestPrunedOffsetsRequest) 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.daml.ledger.api.v2.StateServiceOuterClass.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(getGetActiveContractsMethod()) .addMethod(getGetConnectedDomainsMethod()) .addMethod(getGetLedgerEndMethod()) .addMethod(getGetLatestPrunedOffsetsMethod()) .build(); } } } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy