AbstractReconfigurationEvent

Represents an event source that can trigger a reconfiguration. Additionally, it provides specific handlers for each ReconfigurationResult.

Constructors

Link copied to clipboard
constructor()

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
open suspend override fun finalize(): Either<Nothing, Unit>

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

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

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

Link copied to clipboard

Function called by the framework when a reconfiguration fails.

Link copied to clipboard
suspend override 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

Function called by the framework when a reconfiguration is correctly performed.

Link copied to clipboard

Function called by the framework when a reconfiguration is skipped.

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

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