Class MongoDbEventPublication

java.lang.Object
org.springframework.modulith.events.mongodb.MongoDbEventPublication

class MongoDbEventPublication extends Object
A MongoDB Document to represent event publications.
Author:
Dmitry Belyaev, Björn Kieling
  • Field Details

  • Constructor Details

    • MongoDbEventPublication

      MongoDbEventPublication(UUID id, Instant publicationDate, String listenerId, Object event, @Nullable Instant completionDate)
      Creates a new MongoDbEventPublication for the given id, publication date, listener id, event and completion date.
      Parameters:
      id - must not be null.
      publicationDate - must not be null.
      listenerId - must not be null or empty.
      event - must not be null.
      completionDate - can be null.
    • MongoDbEventPublication

      MongoDbEventPublication(UUID id, Instant publicationDate, String listenerId, Object event)
      Creates a new MongoDbEventPublication for the given publication date, listener id and event.
      Parameters:
      publicationDate - must not be null.
      listenerId - must not be null.
      event - must not be null.
  • Method Details

    • markCompleted

      MongoDbEventPublication markCompleted(Instant instant)
      Marks the publication as completed at the given Instant.
      Parameters:
      instant - must not be null.
      Returns:
      will never be null.