public class TransactionAwareEventPublisher extends DelegatingMultiEventPublisher implements com.atlassian.event.api.EventPublisher, MultiEventPublisher
Note that any transactional operations done in afterCommit(), need to be wrapped in a PROPAGATION_REQUIRES_NEW transaction,
TransactionSynchronization.afterCommit()). This is guaranteed by
Since publishing an event during a transaction causes a
to be registered for cases where many events are sent at once, it makes sense to use
publishAll(Collection), to wrap them
in a single TransactionSynchronization, as transaction performance degrades notably with the number of distinct synchronizations registered.
|Modifier and Type||Method and Description|
Publish events that will be consumed by their respective registered listeners.
register, unregister, unregisterAll
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void publish(Object event)
public void publishAll(Collection<Object> events)
EventPublisher.publish(Object)for every event in the collection.
Copyright © 2021 Atlassian. All rights reserved.