Package-level declarations

Types

Link copied to clipboard

Completely skips validation

Link copied to clipboard
interface EventRecorder

Watches all incoming events with purpose of repeating them later on clean (just constructed) StateMachine instance to reproduce exactly the same StateMachine state as before

Link copied to clipboard
class Record constructor(val eventAndArgument: EventAndArgument<*>, val processingResult: ProcessingResult)
Link copied to clipboard
class RecordedEvents constructor(val structureHashCode: Int, val records: List<Record>)

This class is intended to be serialized by client code

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

Does not allow warnings or failed processing results

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun StateMachine.restoreByRecordedEvents(recordedEvents: RecordedEvents, muteListeners: Boolean = true, disableStructureHashCodeCheck: Boolean = false, validator: RestorationResultValidator = StrictValidator): RestorationResult

Processes RecordedEvents with purpose of restoring a StateMachine to a state configuration as it was before (when the record was made). Starts the StateMachine if necessary and returns RestorationResult allowing to inspect how the restoration was processed. Specified RestorationResultValidator will be called to validate the result so do not have to remember to perform validation of the RestorationResult.

Link copied to clipboard
fun StateMachine.restoreByRecordedEventsBlocking(recordedEvents: RecordedEvents, muteListeners: Boolean = true, disableStructureHashCodeCheck: Boolean = false)

Blocking restoreByRecordedEvents alternative