@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 |
---|---|
Class<? extends ForwardingMode> |
eventForwardingMode
Indicates the forwarding mode used for events within this entity.
|
boolean |
forwardCommands
Indicates whether commands should be forwarded to this AggregateMember.
|
boolean |
forwardEvents
Deprecated.
in favor of the
eventForwardingMode . |
String |
routingKey
The property of the message to be used as a routing key towards this Aggregate Member.
|
Class<?> |
type
Provides the member's type.
|
public abstract boolean forwardCommands
true
.@Deprecated public abstract boolean forwardEvents
eventForwardingMode
.true
.public abstract Class<? extends ForwardingMode> eventForwardingMode
ForwardToAll
to forward all
events to all entities referred to by the annotated field.public abstract Class<?> type
Copyright © 2010–2018. All rights reserved.