SimpleStateAggregate

class SimpleStateAggregate<S : Any>(val aggregateId: AggregateId, val metadata: StateAggregateMetadata<S>, val state: S, var version: Int = Version.UNINITIALIZED_VERSION, var eventId: String = "", var firstOperator: String = "", var operator: String = "", var firstEventTime: Long = 0, var eventTime: Long = 0, var deleted: Boolean = false) : StateAggregate<S> , TypedAggregate<S>

Constructors

Link copied to clipboard
constructor(aggregateId: AggregateId, metadata: StateAggregateMetadata<S>, state: S, version: Int = Version.UNINITIALIZED_VERSION, eventId: String = "", firstOperator: String = "", operator: String = "", firstEventTime: Long = 0, eventTime: Long = 0, deleted: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val aggregateId: AggregateId
Link copied to clipboard
open override val aggregateType: Class<S>

State Aggregation Type

Link copied to clipboard
open override var deleted: Boolean

状态聚合是否已删除

Link copied to clipboard
open override var eventId: String
Link copied to clipboard
open override var eventTime: Long
Link copied to clipboard
Link copied to clipboard
open override var firstEventTime: Long
Link copied to clipboard
open override var firstOperator: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override var operator: String
Link copied to clipboard
open override val state: S
Link copied to clipboard
open override var version: Int

用于生成领域事件版本号.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun onSourcing(eventStream: DomainEventStream): StateAggregate<S>

当聚合未找到匹配的 onSourcing 方法时,不会认为产生的故障,忽略该事件,但更新聚合版本号为该领域事件的版本号.

Link copied to clipboard
fun AggregateIdCapable.toGroupKey(parallelism: Int = DEFAULT_PARALLELISM): Int
Link copied to clipboard
open override fun toString(): String