SubscriptionManifest

class SubscriptionManifest @InternalWowApi constructor(val name: String, val kind: SubscriptionKind, val source: SubscriptionSource, val function: FunctionManifest, val derives: List<String>? = null, val rejected: List<String>? = null, val start: SubscriptionStart? = null, val schedules: List<String>? = null, val retry: RetryManifest? = null, val committed: List<String>? = null, val job: JobManifest? = null, val calls: List<String>? = null)

A subscription: one handler of a processor, named processor.function.

  • derives names the commands a saga's handler may derive, any of its kinds: those its @Sends(derives) declares, else those its return type names (CommandRequest<X>, a list of them), empty when it returns Unit; null for a projection or a reactor. A wait chain may follow the saga's hop only into the contexts of these commands.

  • rejected is set on an @OnRejected handler of a saga and on no other: the commands whose rejections it handles, the one its receipt's C names, or empty for any command the saga sends. Such a handler reads rejections, not state events: its source is empty and not read.

  • committed is set on an @OnCommitted handler of a saga and on no other: the commands whose success receipts it handles, the one its receipt's C names, or empty for any command the saga sends. Like an @OnRejected handler, it reads receipts (isReceiptHandler), not state events. A handler of both receipts, annotated both, has both set.

  • start is where a new subscription starts in the log: what @OnEvent(start) declares, else SubscriptionStart.defaultFor its kind and source; the host may configure another. Null on an @OnRejected or @OnCommitted handler, which reads no log.

  • schedules names the commands a saga's handler may schedule, each by its full type name, as its @Sends(schedules) declares; null when it declares none, and always for a projection or a reactor.

  • retry is the handler's own in-process retry budget, as its @Retry and its processor's declare it: null when neither does. The host's wow.subscriptions.[<context>.<name>].retry.* overrides it, setting by setting.

  • job is the job of a saga's @OnSchedule handler: its subscription reads the context's built-in job aggregate <context>.schedule (source) and hands its job's ticks to the handler. Null for an @OnEvent handler.

  • calls names the commands a saga's handler sends to another context with SagaContext.call, as its @Sends(calls) declares, each referred to as derives refers to a command; null when it declares none. A wait chain may follow the saga's hop into their contexts too, but they need no command topic: the node calls their gateways, at the addresses its host configures.

Fields may be added: pass the constructor's arguments by name.

Constructors

Link copied to clipboard
constructor(name: String, kind: SubscriptionKind, source: SubscriptionSource, function: FunctionManifest, derives: List<String>? = null, rejected: List<String>? = null, start: SubscriptionStart? = null, schedules: List<String>? = null, retry: RetryManifest? = null, committed: List<String>? = null, job: JobManifest? = null, calls: List<String>? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Whether it is a saga's @OnRejected or @OnCommitted handler: it reads receipts, not the log.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun SubscriptionManifest.copyWith(name: String = this.name, kind: SubscriptionKind = this.kind, source: SubscriptionSource = this.source, function: FunctionManifest = this.function, derives: List<String>? = this.derives, rejected: List<String>? = this.rejected, start: SubscriptionStart? = this.start, schedules: List<String>? = this.schedules, retry: RetryManifest? = this.retry, committed: List<String>? = this.committed, job: JobManifest? = this.job, calls: List<String>? = this.calls): SubscriptionManifest
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String