Class MongoDbEventPublication
java.lang.Object
org.springframework.modulith.events.mongodb.MongoDbEventPublication
A MongoDB Document to represent event publications.
- Author:
- Dmitry Belyaev, Björn Kieling
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMongoDbEventPublication
(UUID id, Instant publicationDate, String listenerId, Object event) Creates a newMongoDbEventPublication
for the given publication date, listener id and event.MongoDbEventPublication
(UUID id, Instant publicationDate, String listenerId, Object event, Instant completionDate) Creates a newMongoDbEventPublication
for the given id, publication date, listener id, event and completion date. -
Method Summary
Modifier and TypeMethodDescription(package private) MongoDbEventPublication
markCompleted
(Instant instant) Marks the publication as completed at the givenInstant
.
-
Field Details
-
id
-
publicationDate
-
listenerId
-
event
-
completionDate
-
-
Constructor Details
-
MongoDbEventPublication
MongoDbEventPublication(UUID id, Instant publicationDate, String listenerId, Object event, @Nullable Instant completionDate) Creates a newMongoDbEventPublication
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
Creates a newMongoDbEventPublication
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
Marks the publication as completed at the givenInstant
.- Parameters:
instant
- must not be null.- Returns:
- will never be null.
-