@ParametersAreNonnullByDefault public class OnCommitEventManagerImpl extends Object implements OnCommitEventManager
| Constructor and Description |
|---|
OnCommitEventManagerImpl(TxnAwareEventFactory txnAwareEventFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispatchAsOnCommitEvent(java.util.function.Supplier<Object> eventSupplier)
Will wrap the provided event into a default
OnCommitEvent object, for publishing. |
<T> void |
dispatchOnCommitEvent(java.util.function.Supplier<OnCommitEvent<T>> onCommitEventSupplier)
Will publish the event immediately if not inside a transaction, otherwise will be published once the
current transactions has finished.
|
public OnCommitEventManagerImpl(TxnAwareEventFactory txnAwareEventFactory)
public void dispatchAsOnCommitEvent(java.util.function.Supplier<Object> eventSupplier)
OnCommitEventManagerOnCommitEvent object, for publishing.
The Supplier will be invoked when the event is about to be published.
NB: This is intended for non issue related events that would like to ensure they are fired after any transaction
has completed. For issue related OnCommitEvent, use IssueEventManager
dispatchAsOnCommitEvent in interface OnCommitEventManagereventSupplier - The supplier of the event object to wrap into an OnCommitEvent eventpublic <T> void dispatchOnCommitEvent(java.util.function.Supplier<OnCommitEvent<T>> onCommitEventSupplier)
OnCommitEventManager
The Supplier will be invoked when the event is about to be published, so any data that should be reloaded
can be done inside it. Potentially the OnCommitEvent.getOnCommitEventDataReloadStatus() can be set to
OnCommitEvent.OnCommitEventDataReloadStatus.RELOADED_ON_COMMIT for the event.
NB: This is intended for non issue related events that would like to ensure they are fired after any transaction
has completed. For issue related OnCommitEvent, use IssueEventManager
dispatchOnCommitEvent in interface OnCommitEventManagerT - The wrapped type of the eventonCommitEventSupplier - The supplier of the OnCommitEvent event to sendCopyright © 2002-2019 Atlassian. All Rights Reserved.