Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package daml
    Definition Classes
    com
  • package ledger
    Definition Classes
    daml
  • package participant
    Definition Classes
    ledger
  • package state
    Definition Classes
    participant
  • package v2

    Interfaces to read from and write to an (abstract) participant state.

    Interfaces to read from and write to an (abstract) participant state.

    A Daml ledger participant is code that allows to actively participate in the evolution of a shared Daml ledger. Each such participant maintains a particular view onto the state of the Daml ledger. We call this view the participant state.

    Actual implementations of a Daml ledger participant will likely maintain more state than what is exposed through the interfaces in this package, which is why we talk about an abstract participant state. It abstracts over the different implementations of Daml ledger participants.

    The interfaces are optimized for easy implementation. The v2.WriteService interface contains the methods for changing the participant state (and potentially the state of the Daml ledger), which all ledger participants must support. These methods are for example exposed via the Daml Ledger API. Actual ledger participant implementations likely support more implementation-specific methods. They are however not exposed via the Daml Ledger API. The v2.ReadService interface contains the one method v2.ReadService.stateUpdates to read the state of a ledger participant. It represents the participant state as a stream of v2.Updates to an initial participant state. The typical consumer of this method is a class that subscribes to this stream of v2.Updates and reconstructs (a view of) the actual participant state. See the comments on v2.Update and v2.ReadService.stateUpdates for details about the kind of updates and the guarantees given to consumers of the stream of v2.Updates.

    We do expect the interfaces provided in com.daml.ledger.participant.state to evolve, which is why we provide them all in the com.daml.ledger.participant.state.v2 package. Where possible we will evolve them in a backwards compatible fashion, so that a simple recompile suffices to upgrade to a new version. Where that is not possible, we plan to introduce new version of this API in a separate package and maintain it side-by-side with the existing version if possible. There can therefore potentially be multiple versions of participant state APIs at the same time. We plan to deprecate and drop old versions on separate and appropriate timelines.

    Definition Classes
    state
  • ChangeId
  • CompletionInfo
  • DivulgedContract
  • PruningResult
  • ReadService
  • SubmissionResult
  • SubmitterInfo
  • TransactionMeta
  • Update
  • WriteConfigService
  • WritePackagesService
  • WriteParticipantPruningService
  • WritePartyService
  • WriteService
t

com.daml.ledger.participant.state.v2

WriteParticipantPruningService

trait WriteParticipantPruningService extends AnyRef

An interface to prune participant ledger updates to manage participant ledger space and enable GDPR-style right-to-be-forgotten support.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WriteParticipantPruningService
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def prune(pruneUpToInclusive: Offset, submissionId: SubmissionId, pruneAllDivulgedContracts: Boolean): CompletionStage[PruningResult]

    Prune the participant ledger specifying the offset up to which participant ledger events can be removed.

    Prune the participant ledger specifying the offset up to which participant ledger events can be removed.

    As this interface applies only to the local participant unlike other administrator services, returns a (completion stage of a) PruningResult rather than a SubmissionResult.

    Ledgers that do not elect to support participant pruning, return NotPruned(Status.UNIMPLEMENTED). Returning an error also keeps the ledger api server from pruning its index.

    Ledgers whose participants hold no participant-local state, but want the ledger api server to prune, return ParticipantPruned.

    For pruning implementations to be fault tolerant, the following aspects are important: - Consider failing a prune request before embarking on destructive operations for example if certain safety conditions are not met (such as being low on resources). This helps minimize the chances of partially performed prune operations. If the system cannot prune up to the specified offset, the call should not alter the system and return NotPruned rather than prune partially. - Implement pruning either atomically (performing all operations or none), or break down pruning steps into idempotent pieces that pick up after retries or system recovery in case of a mid-pruning crash. - To the last point, be aware that pruning of the ledger api server index happens in such an idempotent follow-up step upon successful completion of each prune call. To reach eventual consistency upon failures, be sure to return ParticipantPruned even if the specified offset has already been pruned to allow ledger api server index pruning to proceed in case of an earlier failure.

    pruneUpToInclusive

    The offset up to which contracts should be pruned.

    submissionId

    The submission id.

    pruneAllDivulgedContracts

    If set, instruct the ledger to prune all immediately and retroactively divulged contracts created before pruneUpToInclusive independent of whether they were archived before pruneUpToInclusive.

    returns

    The pruning result.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped