SimpleSnapshot

data class SimpleSnapshot<S : Any>(val delegate: ReadOnlyStateAggregate<S>, val snapshotTime: Long = System.currentTimeMillis()) : Snapshot<S> , ReadOnlyStateAggregate<S> , Decorator<ReadOnlyStateAggregate<S>>

Simple implementation of Snapshot that wraps a ReadOnlyStateAggregate with a snapshot time.

Parameters

delegate

the state aggregate being snapshotted

snapshotTime

the time when the snapshot was taken (default: current time)

Type Parameters

S

the type of the state

Constructors

Link copied to clipboard
constructor(delegate: ReadOnlyStateAggregate<S>, snapshotTime: Long = System.currentTimeMillis())

Properties

Link copied to clipboard
open override val delegate: ReadOnlyStateAggregate<S>
Link copied to clipboard
open override val snapshotTime: Long