@Documented @Target(value={FIELD,ANNOTATION_TYPE}) @Retention(value=RUNTIME) public @interface AggregateMember
If the annotation is placed on a Collection of Entities, an Entity is selected for Command handling based on the
Entity's identifier and the value of the routing key property on the Command. See EntityId
for more
information.
If the annotation is placed on a Map of Entities, the key of the Map should be equal to the Entity's identifier. Note
that Entities in the Map still need to specify which routing key to use. To that end Entities should contain a EntityId
annotated identifier field. Usually it is advantageous in terms of performance to store Entities in a Map
instead of Collection.
Modifier and Type | Optional Element and Description |
---|---|
boolean |
forwardCommands
Indicates whether commands should be forwarded to this AggregateMember.
|
boolean |
forwardEvents
Indicates whether events should be forwarded to this AggregateMember.
|
Class<?> |
type
Provides the member's type.
|
public abstract boolean forwardCommands
true
.public abstract boolean forwardEvents
true
.public abstract Class<?> type
Copyright © 2010–2017. All rights reserved.