public class PluginTransactionListener extends Object implements InitializingComponent
PluginTransactionEndEvent and
translating it to JiraPluginCacheResetEvent which is send in no-cache replication context.
Also prints some statistics for diagnostic purpose.| Constructor and Description |
|---|
PluginTransactionListener(com.atlassian.event.api.EventPublisher eventPublisher,
ReplicationPauserManager replicationPauserManager,
JiraProperties jiraProperties) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterInstantiation()
Just for ordering,
InitializingComponent are initialized before other components and here we want to
initialize ASAP as we listen to PluginEnabledEvent. |
void |
onPluginEnabledEvent(com.atlassian.plugin.event.events.PluginEnabledEvent pluginEnabledEvent)
Deprecated.
Should be removed in next breaking API release (Jira 9.0) when all plugins should switch to
PluginTransactionEndEvent
or to LifecycleAware.onStart() where onStart() would be triggered by PluginTransactionEndEvent. |
void |
onPluginFrameworkShutdownEvent(com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent event) |
void |
onPluginTransactionStartEvent(com.atlassian.plugin.event.events.PluginTransactionStartEvent pluginTransactionStartEvent) |
void |
onPluginTransactionStopEvent(com.atlassian.plugin.event.events.PluginTransactionEndEvent pluginTransactionEndEvent) |
public PluginTransactionListener(com.atlassian.event.api.EventPublisher eventPublisher,
ReplicationPauserManager replicationPauserManager,
JiraProperties jiraProperties)
public void afterInstantiation()
throws Exception
InitializingComponent are initialized before other components and here we want to
initialize ASAP as we listen to PluginEnabledEvent.
See ComponentManager.runInitializingComponents()afterInstantiation in interface InitializingComponentException@EventListener public void onPluginFrameworkShutdownEvent(com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent event)
@EventListener(order=-2147483648) public void onPluginTransactionStartEvent(com.atlassian.plugin.event.events.PluginTransactionStartEvent pluginTransactionStartEvent)
@EventListener(order=-2147483648) @Deprecated public void onPluginEnabledEvent(com.atlassian.plugin.event.events.PluginEnabledEvent pluginEnabledEvent)
PluginTransactionEndEvent
or to LifecycleAware.onStart() where onStart() would be triggered by PluginTransactionEndEvent.PluginEnabledEvent - at this time we want some of the Jira caches to be cleared
before any plugin get the chance to respond to the PluginEnabledEvent.@EventListener(order=-2147483648) public void onPluginTransactionStopEvent(com.atlassian.plugin.event.events.PluginTransactionEndEvent pluginTransactionEndEvent)
Copyright © 2002-2023 Atlassian. All Rights Reserved.