ReconfigurationEvent

Represents an event source that can trigger a reconfiguration.

Inheritors

Functions

Link copied to clipboard
abstract fun condition(event: T): Boolean

Represents the condition that must be satisfied for triggering the reconfiguration. This method is called for each event received by the eventsFlow.

Link copied to clipboard
abstract fun eventsFlow(): Flow<T>

Represents the flow of events that must be monitored for triggering the reconfiguration.

Link copied to clipboard
abstract suspend fun finalize(): Either<Nothing, Unit>

Asynchronously finalizes the entity. Can Either succeed or fail with an Error.

Link copied to clipboard
abstract suspend fun initialize(): Either<Nothing, Unit>

Asynchronously initializes the entity. Can Either succeed or fail with an Error.

Link copied to clipboard
abstract suspend fun onProcessedEvent(result: ReconfigurationResult<T>)

Method that must be called on each evaluated event. For each event, a result must be provided.

Link copied to clipboard
abstract fun resultsFlow(): Flow<ReconfigurationResult<T>>

Represents the flow of results of the reconfiguration. It is a companion flow of eventsFlow.