public final class DefaultEventEntryFactory extends Object implements EventEntryFactory<byte[]>
Constructor and Description |
---|
DefaultEventEntryFactory()
Creates a new instance of the factory which stores the timestamps with the original timezone of the event
messages.
|
DefaultEventEntryFactory(boolean forceUtc)
Creates a new instance of the factory which, when
forceUtc true , stores the timestamps
converted to UTC timezone. |
Modifier and Type | Method and Description |
---|---|
Object |
createDomainEventEntry(String aggregateType,
DomainEventMessage event,
SerializedObject<byte[]> serializedPayload,
SerializedObject<byte[]> serializedMetaData)
Creates an entity representing a Domain Event, which contains the data provided in the parameters, which can be
stored using the JPA Entity Manager configured on the JpaEventStore using this factory.
|
Object |
createSnapshotEventEntry(String aggregateType,
DomainEventMessage snapshotEvent,
SerializedObject<byte[]> serializedPayload,
SerializedObject<byte[]> serializedMetaData)
Creates an entity representing a Snapshot Event, which contains the data provided in the parameters, which can
be stored using the JPA Entity Manager configured on the JpaEventStore using this factory.
|
Class<byte[]> |
getDataType()
Returns the type used to store serialized payloads.
|
String |
getDomainEventEntryEntityName()
Returns the entity name of the Domain Event Entry provided by this factory.
|
String |
getSnapshotEventEntryEntityName()
Returns the entity name of the Snapshot Event Entry provided by this factory.
|
public DefaultEventEntryFactory()
public DefaultEventEntryFactory(boolean forceUtc)
forceUtc
true
, stores the timestamps
converted to UTC timezone.forceUtc
- whether to convert timestamps to the UTC time zone.public Class<byte[]> getDataType()
EventEntryFactory
EventEntryFactory.createSnapshotEventEntry(String,
org.axonframework.domain.DomainEventMessage, org.axonframework.serializer.SerializedObject,
org.axonframework.serializer.SerializedObject)
and EventEntryFactory.createDomainEventEntry(String,
org.axonframework.domain.DomainEventMessage, org.axonframework.serializer.SerializedObject,
org.axonframework.serializer.SerializedObject)
respectively.getDataType
in interface EventEntryFactory<byte[]>
public Object createDomainEventEntry(String aggregateType, DomainEventMessage event, SerializedObject<byte[]> serializedPayload, SerializedObject<byte[]> serializedMetaData)
EventEntryFactory
createDomainEventEntry
in interface EventEntryFactory<byte[]>
aggregateType
- The type identifier of the aggregate that generated the domain eventevent
- The DomainEventMessage containing the data to storeserializedPayload
- The serialized payloadserializedMetaData
- The serialized meta datapublic Object createSnapshotEventEntry(String aggregateType, DomainEventMessage snapshotEvent, SerializedObject<byte[]> serializedPayload, SerializedObject<byte[]> serializedMetaData)
EventEntryFactory
createSnapshotEventEntry
in interface EventEntryFactory<byte[]>
aggregateType
- The type identifier of the aggregate that generated the domain eventsnapshotEvent
- The DomainEventMessage containing the data to storeserializedPayload
- The serialized payloadserializedMetaData
- The serialized meta datapublic String getDomainEventEntryEntityName()
EventEntryFactory
getDomainEventEntryEntityName
in interface EventEntryFactory<byte[]>
public String getSnapshotEventEntryEntityName()
EventEntryFactory
getSnapshotEventEntryEntityName
in interface EventEntryFactory<byte[]>
Copyright © 2010-2014. All Rights Reserved.