SubscriptionDirectory

What a wait needs to know about the subscriptions its chain names, until the Manifest gives it (admission checks the chain against the Manifest).

The subscription runtime is one implementation, for the subscriptions of its own service; a Manifest-backed one will answer for other contexts too.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open fun covers(subscription: String, type: AggregateType): Boolean

Whether subscription of type's context handles the streams of type. By default, whether the subscription is known in that context at all; a directory that knows the subscriptions' filters answers per aggregate type.

Link copied to clipboard
open fun derivedContextsOf(context: String, subscription: String): Set<String>?

The contexts of the commands the saga subscription of context declares it derives, or null when it declares none, or they cannot all be resolved: then a chain may follow its hop into any context.

Link copied to clipboard
open fun hasContext(context: String): Boolean

Whether context is a bounded context this directory knows, so a hop may name it. True by default: a directory that knows only subscriptions cannot tell.

Link copied to clipboard
abstract suspend fun hasHandled(subscription: String, stream: EventStreamRecord): Boolean

Whether subscription has handled stream for good: its checkpoint is past the stream's position and its aggregate is not parked. False when that cannot be told.

Link copied to clipboard
abstract fun kindOf(context: String, subscription: String): FunctionKind?

The kind of subscription in context, or null when it is not known.