StateAggregate

State Aggregate .

  1. 聚合状态容器

  2. 订阅领域事件,修改聚合状态

  3. 状态聚合必须具有无参构造函数,作为序列化使用

Author

ahoo wang

Inheritors

Types

Link copied to clipboard
object Companion

Properties

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

State Aggregation Type

Link copied to clipboard
abstract val deleted: Boolean

状态聚合是否已删除

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

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

Functions

Link copied to clipboard
abstract fun onSourcing(eventStream: DomainEventStream): StateAggregate<S>

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

Link copied to clipboard
fun AggregateIdCapable.toGroupKey(parallelism: Int = DEFAULT_PARALLELISM): Int