Interface EventPublicationRepository
- All Known Implementing Classes:
JdbcEventPublicationRepository,JpaEventPublicationRepository,MongoDbEventPublicationRepository
public interface EventPublicationRepository
Repository to store
EventPublications.- Author:
- Björn Kieling, Dmitry Belyaev, Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptioncreate(EventPublication publication) Persists the givenEventPublication.voidDeletes all publications that were already marked as completed.Returns allEventPublicationthat have not been completed yet.findIncompletePublicationsByEventAndTargetIdentifier(Object event, PublicationTargetIdentifier targetIdentifier) Return the incompleteEventPublicationfor the given serialized event and listener identifier.update(CompletableEventPublication publication) Update the data store to mark the backing log entry as completed.
-
Method Details
-
create
Persists the givenEventPublication.- Parameters:
publication- must not be null.- Returns:
- will never be null.
-
update
Update the data store to mark the backing log entry as completed.- Parameters:
publication- must not be null.- Returns:
- will never be null.
-
findIncompletePublications
List<EventPublication> findIncompletePublications()Returns allEventPublicationthat have not been completed yet.- Returns:
- will never be null.
-
findIncompletePublicationsByEventAndTargetIdentifier
Optional<EventPublication> findIncompletePublicationsByEventAndTargetIdentifier(Object event, PublicationTargetIdentifier targetIdentifier) Return the incompleteEventPublicationfor the given serialized event and listener identifier.- Parameters:
event- must not be null.targetIdentifier- must not be null.- Returns:
- will never be null.
-
deleteCompletedPublications
void deleteCompletedPublications()Deletes all publications that were already marked as completed.
-