public final class AggregateEventTag<Event extends AggregateEvent<Event>>
extends Object
PersistentEntity events may implement this
interface to make the events available for read-side processing.
The tag should be unique among the event types of the service.
The class name can be used as tag, but note that it is needed
to retain the original tag when the class name is changed because
the tag is part of the store event data.
| Constructor and Description |
|---|
AggregateEventTag(Class<Event> eventType,
String tag) |
| Modifier and Type | Method and Description |
|---|---|
Class<Event> |
eventType() |
static <Event extends AggregateEvent<Event>> |
of(Class<Event> eventType)
Convenience factory method of
AggregateEventTag that uses the
class name of the event type as tag. |
static <Event extends AggregateEvent<Event>> |
of(Class<Event> eventType,
String tag)
Factory method of
AggregateEventTag. |
String |
tag() |
public AggregateEventTag(Class<Event> eventType, String tag)
public static <Event extends AggregateEvent<Event>> AggregateEventTag<Event> of(Class<Event> eventType)
AggregateEventTag that uses the
class name of the event type as tag. Note that it is needed to
retain the original tag when the class name is changed because
the tag is part of the store event data.public static <Event extends AggregateEvent<Event>> AggregateEventTag<Event> of(Class<Event> eventType, String tag)
AggregateEventTag.public Class<Event> eventType()
public String tag()