Interface EventPublicationRegistry
- All Known Implementing Classes:
DefaultEventPublicationRegistry
public interface EventPublicationRegistry
A registry to capture event publications to
ApplicationListener
s. Allows to register those publications, mark
them as completed and lookup incomplete publications.- Author:
- Oliver Drotbohm, Björn Kieling, Dmitry Belyaev
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteCompletedPublicationsOlderThan
(Duration duration) Deletes all completedTargetEventPublication
s that have been completed before the givenDuration
.Returns allTargetEventPublication
s that have not been completed yet.findIncompletePublicationsOlderThan
(Duration duration) Returns allTargetEventPublication
s that have not been completed yet and have been published before the given duration in relation to "now".void
markCompleted
(Object event, PublicationTargetIdentifier targetIdentifier) Marks the publication for the given event andPublicationTargetIdentifier
as completed.store
(Object event, Stream<PublicationTargetIdentifier> listeners) StoresTargetEventPublication
s for the given event andApplicationListener
s.
-
Method Details
-
store
Collection<TargetEventPublication> store(Object event, Stream<PublicationTargetIdentifier> listeners) StoresTargetEventPublication
s for the given event andApplicationListener
s.- Parameters:
event
- must not be null.listeners
- must not be null.
-
findIncompletePublications
Collection<TargetEventPublication> findIncompletePublications()Returns allTargetEventPublication
s that have not been completed yet.- Returns:
- will never be null.
-
findIncompletePublicationsOlderThan
Returns allTargetEventPublication
s that have not been completed yet and have been published before the given duration in relation to "now".- Parameters:
duration
- must not be null.- Returns:
- will never be null.
- Since:
- 1.1
-
markCompleted
Marks the publication for the given event andPublicationTargetIdentifier
as completed.- Parameters:
event
- must not be null.targetIdentifier
- must not be null.
-
deleteCompletedPublicationsOlderThan
Deletes all completedTargetEventPublication
s that have been completed before the givenDuration
.- Parameters:
duration
- must not be null.
-