Package-level declarations

Types

Link copied to clipboard
@OnMessage(functionKind = FunctionKind.COMMAND, defaultFunctionName = "afterCommand")
annotation class AfterCommand(val include: Array<KClass<*>> = [], val exclude: Array<KClass<*>> = [])

在命令函数完成执行后执行的函数。

Link copied to clipboard
annotation class AggregateRoot(val commands: Array<KClass<*>> = [])

Aggregate Root tag.

Link copied to clipboard
annotation class AggregateRoute(val resourceName: String = "", val owner: AggregateRoute.Owner = Owner.NEVER)

Marks a class as an aggregate route, which is used to define the routing behavior for aggregate operations. The annotation can specify the resource name and the ownership policy for the aggregate.

Link copied to clipboard

当聚合根未创建时允许创建

Link copied to clipboard
annotation class Blocking
Link copied to clipboard
annotation class BoundedContext(val name: String, val alias: String = "", val scopes: Array<String> = [], val packageScopes: Array<KClass<*>> = [], val aggregates: Array<BoundedContext.Aggregate> = [])
Link copied to clipboard
annotation class CommandRoute(val action: String = DEFAULT_COMMAND_ACTION, val enabled: Boolean = true, val method: CommandRoute.Method = Method.DEFAULT, val prefix: String = "", val appendIdPath: CommandRoute.AppendPath = AppendPath.DEFAULT, val appendTenantPath: CommandRoute.AppendPath = AppendPath.DEFAULT, val appendOwnerPath: CommandRoute.AppendPath = AppendPath.DEFAULT, val summary: String = "", val description: String = "")

Marks a class or annotation as a command route, defining the action, method, and other properties for handling commands.

Link copied to clipboard

标记命令为创建聚合命令,这意味着该命令是聚合的第一个命令.

Link copied to clipboard
Link copied to clipboard
annotation class Event(val revision: String = DEFAULT_REVISION)

Event .

Link copied to clipboard
Link copied to clipboard
annotation class Name(val value: String)
Link copied to clipboard
@OnMessage(functionKind = FunctionKind.COMMAND, defaultFunctionName = "onCommand")
annotation class OnCommand(val returns: Array<KClass<*>> = [])

OnCommand .

Link copied to clipboard
@OnMessage(functionKind = FunctionKind.ERROR, defaultFunctionName = "onError")
annotation class OnError

OnCommandError .

Link copied to clipboard
@OnMessage(functionKind = FunctionKind.EVENT, defaultFunctionName = "onEvent")
annotation class OnEvent(val value: String)

On Event .

Link copied to clipboard
annotation class OnMessage(val functionKind: FunctionKind, val defaultFunctionName: String)

OnMessage .

Link copied to clipboard
@OnMessage(functionKind = FunctionKind.SOURCING, defaultFunctionName = "onSourcing")
annotation class OnSourcing

OnSourcing .

Link copied to clipboard
@OnMessage(functionKind = FunctionKind.STATE_EVENT, defaultFunctionName = "onStateEvent")
annotation class OnStateEvent(val value: String)

Marks a function as a handler for state events, indicating that the function should be invoked when a state event is emitted. This annotation is used in conjunction with the OnMessage annotation to specify the type of message and default function name.

Link copied to clipboard
annotation class Order(val value: Int = ORDER_DEFAULT, val before: Array<KClass<*>> = [], val after: Array<KClass<*>> = [])
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class Retry(val enabled: Boolean = true, val maxRetries: Int = DEFAULT_MAX_RETRIES, val minBackoff: Int = DEFAULT_MIN_BACKOFF, val executionTimeout: Int = DEFAULT_EXECUTION_TIMEOUT, val recoverable: Array<KClass<out Throwable>> = [], val unrecoverable: Array<KClass<out Throwable>> = [])

用于标记函数,以启用重试机制。该注解允许配置重试策略,包括是否启用、最大重试次数、最小回退时间、执行超时时间以及指定可恢复和不可恢复的异常类型。

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
annotation class StaticTenantId(val tenantId: String = TenantId.DEFAULT_TENANT_ID)
Link copied to clipboard

ValueObject annotation is used to mark a class or an annotation as a value object. A value object represents a domain concept that is defined by its data and does not have a distinct identity. This annotation can be applied to classes and annotation classes.

Link copied to clipboard

标记命令为虚空命令(Void Command)。

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val ORDER_DEFAULT: Int = 0
Link copied to clipboard
const val ORDER_DEFAULT_STEP: Int = 100
Link copied to clipboard
const val ORDER_FIRST: Int
Link copied to clipboard
const val ORDER_LAST: Int