Class DefaultEventPublicationRegistry.PublicationsInProgress
java.lang.Object
org.springframework.modulith.events.core.DefaultEventPublicationRegistry.PublicationsInProgress
- All Implemented Interfaces:
Iterable<TargetEventPublication>
- Enclosing class:
- DefaultEventPublicationRegistry
static class DefaultEventPublicationRegistry.PublicationsInProgress
extends Object
implements Iterable<TargetEventPublication>
All
TargetEventPublications currently processed.- Since:
- 1.3
- Author:
- Oliver Drotbohm
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) Optional<TargetEventPublication>getPublication(Object event, PublicationTargetIdentifier identifier) Returns theTargetEventPublicationassociated with the given event andPublicationTargetIdentifier.iterator()(package private) TargetEventPublicationregister(TargetEventPublication publication) Registers the givenTargetEventPublicationas currently processed.(package private) voidunregister(Object event, PublicationTargetIdentifier identifier) Unregisters theTargetEventPublicationassociated with the given event andPublicationTargetIdentifier.(package private) voidunregister(TargetEventPublication publication) Unregisters theTargetEventPublication..Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
PublicationsInProgress
PublicationsInProgress()
-
-
Method Details
-
register
Registers the givenTargetEventPublicationas currently processed.- Parameters:
publication- must not be null.- Returns:
- will never be null.
-
unregister
Unregisters theTargetEventPublicationassociated with the given event andPublicationTargetIdentifier.- Parameters:
event- must not be null.identifier- must not be null.
-
unregister
Unregisters theTargetEventPublication..- Parameters:
publication- must not be null.
-
getPublication
Optional<TargetEventPublication> getPublication(Object event, PublicationTargetIdentifier identifier) Returns theTargetEventPublicationassociated with the given event andPublicationTargetIdentifier.- Parameters:
event- must not be null.identifier- must not be null.- Returns:
- will never be null.
-
iterator
- Specified by:
iteratorin interfaceIterable<TargetEventPublication>
-