Class DomainEventEntry

All Implemented Interfaces:
DomainEventData<byte[]>, EventData<byte[]>

@Entity @Entity public class DomainEventEntry extends AbstractSequencedDomainEventEntry<byte[]>
Default implementation of a tracked domain event entry. This implementation is used by the JpaEventStorageEngine to store events. Event payload and metadata are serialized to a byte array.
Author:
Rene de Waele
  • Constructor Details

    • DomainEventEntry

      public DomainEventEntry(DomainEventMessage<?> eventMessage, Serializer serializer)
      Construct a new default domain event entry from a published domain event message to enable storing the event or sending it to a remote location. The event payload and metadata will be serialized to a byte array.

      The given serializer will be used to serialize the payload and metadata in the given eventMessage. The type of the serialized data will be the same as the given contentType.

      Parameters:
      eventMessage - The event message to convert to a serialized event entry
      serializer - The serializer to convert the event
    • DomainEventEntry

      protected DomainEventEntry()
      Default constructor required by JPA