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

com.daml.ledger.api.v1.admin.ParticipantPruningServiceGrpc Maven / Gradle / Ivy

package com.daml.ledger.api.v1.admin;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * Prunes/truncates the "oldest" transactions from the participant (the participant Ledger Api Server plus any other
 * participant-local state) by removing a portion of the ledger in such a way that the set of future, allowed
 * commands are not affected.
 * This enables:
 * 1. keeping the "inactive" portion of the ledger to a manageable size and
 * 2. removing inactive state to honor the right to be forgotten.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: com/daml/ledger/api/v1/admin/participant_pruning_service.proto") @io.grpc.stub.annotations.GrpcGenerated public final class ParticipantPruningServiceGrpc { private ParticipantPruningServiceGrpc() {} public static final String SERVICE_NAME = "com.daml.ledger.api.v1.admin.ParticipantPruningService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getPruneMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Prune", requestType = com.daml.ledger.api.v1.admin.ParticipantPruningServiceOuterClass.PruneRequest.class, responseType = com.daml.ledger.api.v1.admin.ParticipantPruningServiceOuterClass.PruneResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getPruneMethod() { io.grpc.MethodDescriptor getPruneMethod; if ((getPruneMethod = ParticipantPruningServiceGrpc.getPruneMethod) == null) { synchronized (ParticipantPruningServiceGrpc.class) { if ((getPruneMethod = ParticipantPruningServiceGrpc.getPruneMethod) == null) { ParticipantPruningServiceGrpc.getPruneMethod = getPruneMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Prune")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.daml.ledger.api.v1.admin.ParticipantPruningServiceOuterClass.PruneRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.daml.ledger.api.v1.admin.ParticipantPruningServiceOuterClass.PruneResponse.getDefaultInstance())) .setSchemaDescriptor(new ParticipantPruningServiceMethodDescriptorSupplier("Prune")) .build(); } } } return getPruneMethod; } /** * Creates a new async stub that supports all call types for the service */ public static ParticipantPruningServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public ParticipantPruningServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ParticipantPruningServiceStub(channel, callOptions); } }; return ParticipantPruningServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static ParticipantPruningServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public ParticipantPruningServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ParticipantPruningServiceBlockingStub(channel, callOptions); } }; return ParticipantPruningServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static ParticipantPruningServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public ParticipantPruningServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ParticipantPruningServiceFutureStub(channel, callOptions); } }; return ParticipantPruningServiceFutureStub.newStub(factory, channel); } /** *
   * Prunes/truncates the "oldest" transactions from the participant (the participant Ledger Api Server plus any other
   * participant-local state) by removing a portion of the ledger in such a way that the set of future, allowed
   * commands are not affected.
   * This enables:
   * 1. keeping the "inactive" portion of the ledger to a manageable size and
   * 2. removing inactive state to honor the right to be forgotten.
   * 
*/ public static abstract class ParticipantPruningServiceImplBase implements io.grpc.BindableService { /** *
     * Prune the ledger specifying the offset before and at which ledger transactions should be removed. Only returns when
     * the potentially long-running prune request ends successfully or with an error.
     * 
*/ public void prune(com.daml.ledger.api.v1.admin.ParticipantPruningServiceOuterClass.PruneRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPruneMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getPruneMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.daml.ledger.api.v1.admin.ParticipantPruningServiceOuterClass.PruneRequest, com.daml.ledger.api.v1.admin.ParticipantPruningServiceOuterClass.PruneResponse>( this, METHODID_PRUNE))) .build(); } } /** *
   * Prunes/truncates the "oldest" transactions from the participant (the participant Ledger Api Server plus any other
   * participant-local state) by removing a portion of the ledger in such a way that the set of future, allowed
   * commands are not affected.
   * This enables:
   * 1. keeping the "inactive" portion of the ledger to a manageable size and
   * 2. removing inactive state to honor the right to be forgotten.
   * 
*/ public static final class ParticipantPruningServiceStub extends io.grpc.stub.AbstractAsyncStub { private ParticipantPruningServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ParticipantPruningServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ParticipantPruningServiceStub(channel, callOptions); } /** *
     * Prune the ledger specifying the offset before and at which ledger transactions should be removed. Only returns when
     * the potentially long-running prune request ends successfully or with an error.
     * 
*/ public void prune(com.daml.ledger.api.v1.admin.ParticipantPruningServiceOuterClass.PruneRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getPruneMethod(), getCallOptions()), request, responseObserver); } } /** *
   * Prunes/truncates the "oldest" transactions from the participant (the participant Ledger Api Server plus any other
   * participant-local state) by removing a portion of the ledger in such a way that the set of future, allowed
   * commands are not affected.
   * This enables:
   * 1. keeping the "inactive" portion of the ledger to a manageable size and
   * 2. removing inactive state to honor the right to be forgotten.
   * 
*/ public static final class ParticipantPruningServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private ParticipantPruningServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ParticipantPruningServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ParticipantPruningServiceBlockingStub(channel, callOptions); } /** *
     * Prune the ledger specifying the offset before and at which ledger transactions should be removed. Only returns when
     * the potentially long-running prune request ends successfully or with an error.
     * 
*/ public com.daml.ledger.api.v1.admin.ParticipantPruningServiceOuterClass.PruneResponse prune(com.daml.ledger.api.v1.admin.ParticipantPruningServiceOuterClass.PruneRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPruneMethod(), getCallOptions(), request); } } /** *
   * Prunes/truncates the "oldest" transactions from the participant (the participant Ledger Api Server plus any other
   * participant-local state) by removing a portion of the ledger in such a way that the set of future, allowed
   * commands are not affected.
   * This enables:
   * 1. keeping the "inactive" portion of the ledger to a manageable size and
   * 2. removing inactive state to honor the right to be forgotten.
   * 
*/ public static final class ParticipantPruningServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private ParticipantPruningServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ParticipantPruningServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ParticipantPruningServiceFutureStub(channel, callOptions); } /** *
     * Prune the ledger specifying the offset before and at which ledger transactions should be removed. Only returns when
     * the potentially long-running prune request ends successfully or with an error.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture prune( com.daml.ledger.api.v1.admin.ParticipantPruningServiceOuterClass.PruneRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPruneMethod(), getCallOptions()), request); } } private static final int METHODID_PRUNE = 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 ParticipantPruningServiceImplBase serviceImpl; private final int methodId; MethodHandlers(ParticipantPruningServiceImplBase 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_PRUNE: serviceImpl.prune((com.daml.ledger.api.v1.admin.ParticipantPruningServiceOuterClass.PruneRequest) 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 ParticipantPruningServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { ParticipantPruningServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return com.daml.ledger.api.v1.admin.ParticipantPruningServiceOuterClass.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("ParticipantPruningService"); } } private static final class ParticipantPruningServiceFileDescriptorSupplier extends ParticipantPruningServiceBaseDescriptorSupplier { ParticipantPruningServiceFileDescriptorSupplier() {} } private static final class ParticipantPruningServiceMethodDescriptorSupplier extends ParticipantPruningServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; ParticipantPruningServiceMethodDescriptorSupplier(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 (ParticipantPruningServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ParticipantPruningServiceFileDescriptorSupplier()) .addMethod(getPruneMethod()) .build(); } } } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy