Packages

c

com.digitalasset.canton.console.declarative

DeclarativeParticipantApi

class DeclarativeParticipantApi extends DeclarativeApi[DeclarativeParticipantConfig, ParticipantId]

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DeclarativeParticipantApi
  2. DeclarativeApi
  3. NamedLogging
  4. DeclarativeApiHandle
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new DeclarativeParticipantApi(name: String, ledgerApiConfig: ClientConfig, adminApiConfig: ClientConfig, consistencyTimeout: NonNegativeDuration, adminToken: => Option[CantonAdminToken], runnerFactory: (String) => GrpcAdminCommandRunner, closeContext: CloseContext, metrics: DeclarativeApiMetrics, loggerFactory: NamedLoggerFactory)(implicit executionContext: ExecutionContext)

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. def activeAdminToken: Option[CantonAdminToken]
    Attributes
    protected
    Definition Classes
    DeclarativeParticipantApiDeclarativeApi
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. val closeContext: CloseContext
  8. val consistencyTimeout: NonNegativeDuration
  9. lazy val currentConfig: AtomicReference[DeclarativeParticipantConfig]
    Attributes
    protected
    Definition Classes
    DeclarativeApi
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  13. implicit val executionContext: ExecutionContext
  14. final def fetchAll[S](request: (PositiveInt) => Either[String, Seq[S]], lessThan: PositiveInt = startLimit): Either[String, Seq[S]]
    Attributes
    protected
    Definition Classes
    DeclarativeApi
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  17. def invalidConfig()(implicit traceContext: TraceContext): Unit
    Definition Classes
    DeclarativeApiDeclarativeApiHandle
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  20. val loggerFactory: NamedLoggerFactory
  21. val metrics: DeclarativeApiMetrics
  22. val name: String
  23. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. def newConfig(cfg: DeclarativeParticipantConfig)(implicit traceContext: TraceContext): Boolean
    Definition Classes
    DeclarativeApiDeclarativeApiHandle
  26. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  29. def poke()(implicit traceContext: TraceContext): Unit
    Definition Classes
    DeclarativeApiDeclarativeApiHandle
  30. def prepare(config: DeclarativeParticipantConfig)(implicit traceContext: TraceContext): Either[String, ParticipantId]
    Attributes
    protected
    Definition Classes
    DeclarativeParticipantApiDeclarativeApi
  31. def run[K, V](name: String, removeExcess: Boolean, checkSelfConsistent: Boolean, want: Seq[(K, V)], fetch: (PositiveInt) => Either[String, Seq[(K, V)]], add: (K, V) => Either[String, Unit], upd: (K, V, V) => Either[String, Unit], rm: (K, V) => Either[String, Unit], compare: Option[(V, V) => Boolean] = None, await: Option[(Seq[K]) => Either[String, Boolean]] = None, onlyCheckKeys: Boolean = false)(implicit traceContext: TraceContext): Either[String, UpdateResult]

    Generic self-consistency update runner

    Generic self-consistency update runner

    This function can be used to determine and apply a set of changes to a system. We generally refer to the state on a per key basis (e.g. user name, party name, dar-id etc). Each key points to a value. So effectively, we compare for each key whether the values match and if they don't, we update the state such that they do.

    name

    the name of the operation (e.g. dars, parties)*

    removeExcess

    if true, then items which are on the node but not found in the config will be removed. this is off by default to ensure that state that has been added via the admin api is not deleted.

    checkSelfConsistent

    if true (default), then the system will check whether it successfully updated the rows by checking the state after an update and verifying that it matches now the "wanted" state.

    want

    the state as desired

    fetch

    a function to fetch the current state. the function takes a limit argument. If the fetch returns the max limit, we assume that we need to fetch more. The system will start to emit warnings but increase the fetch limit to remain functional but to warn the user that they are reaching the limits of managing a node through a config file.

    add

    if the runner finds a value (K,V) in the want set which is not in the have set, it will invoke the add function.

    upd

    if the runner finds a value (K,V) where the want value V differs from the current have value V', then the update function is invoked. The first V is the desired, the second is the existing state.

    rm

    if removeExcess is set to true and the runner finds a K in the have set but not in the want set, it will invoke the rm function to remove K.

    compare

    supply distinct comparison function that checks whether an update is necessary (in case x:V \== y:V) needs adjustment

    await

    the await function can be used to wait for a specific result after the update cycle (concretely, we wait for the ledger api server to observe the parties before we start adding users that refer to these parties)

    Attributes
    protected
    Definition Classes
    DeclarativeApi
  32. final def runSync()(implicit traceContext: TraceContext): Boolean

    Trigger a synchronisation

    Trigger a synchronisation

    This method is thread safe as it will only run one synchronisation at a time (managed through an atomic reference). If no sync is currently running, the method will return only when the sync is finished. If a sync is already running, the method will return immediately.

    Concurrent sync runs are very rare, but can happen if the file is changed while a manual synchronizer connection is being added via the console commands or if the sync is currently failing due to a config issue or a bug.

    Definition Classes
    DeclarativeApi
    Annotations
    @tailrec()
  33. def sync(config: DeclarativeParticipantConfig, context: ParticipantId)(implicit traceContext: TraceContext): Either[String, UpdateResult]
    Attributes
    protected
    Definition Classes
    DeclarativeParticipantApiDeclarativeApi
  34. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  35. def toString(): String
    Definition Classes
    AnyRef → Any
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  38. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  39. def withRetry(action: => Either[String, Boolean], description: String)(implicit traceContext: TraceContext, executionContext: ExecutionContext): Either[String, Unit]
    Attributes
    protected
    Definition Classes
    DeclarativeApi

Deprecated Value Members

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

    (Since version 9)

Ungrouped