EventScope

fun interface EventScope<in T>

An interface describing the operations that can be performed when we want to issue some events. Usually, commands will be described as extensions to the EventScope interface.

Parameters

T

the type of the application-specific event data.

Functions

Link copied to clipboard
abstract fun yield(event: T): EventIdentifier

Append a new event to the issued operations by this site. A happens-before relationship is established with (at least) all the preceding events on this site; therefore, two subsequent calls to yield guarantee that the order of the operations will be preserved.

Link copied to clipboard
open fun yieldAll(events: Iterable<T>)

Appends an Iterable of events to the operations of this site.

open fun yieldAll(events: Iterator<T>)

Appends an Iterator of events to the operations of this site.