Package com.atlassian.jira.plugin
Class JiraPluginCacheResetEvent
java.lang.Object
com.atlassian.jira.plugin.JiraPluginCacheResetEvent
This event should be used in Jira to clear caches which are dependent on the state of the plugin system.
The meaning of this event: something has changed in the plugin system and if your cache depends on it,
you should make sure that after this event your cache reflects the new state of the plugin system.
This event was added in 8.2.0 and was always triggered by
PluginTransactionEndEvent
.
However, this was unintentionally an API-breaking change, as it did not respect the existing contract between plugins
and Jira Core. In said contract, plugins expect up-to-date caches upon receipt of a PluginEnabledEvent
.
Since 8.2.4/8.3.0 the contract is back and this event is also triggered by PluginEnabledEvent
.
JiraPluginCacheResetEvent
is sent in a no-cache-replication context.
See ReplicationPauserManager
-
Constructor Summary
ConstructorsConstructorDescriptionJiraPluginCacheResetEvent
(com.atlassian.plugin.event.events.PluginTransactionEndEvent pluginTransactionEndEvent) -
Method Summary
Modifier and TypeMethodDescriptionSeePluginTransactionEndEvent.getUnmodifiableEvents()
<T> boolean
hasAnyEventOfTypeMatching
(Class<T> eventTypeClass, Predicate<T> anyMatchEventPredicate) SeePluginTransactionEndEvent.hasAnyEventOfTypeMatching(Class, Predicate)
boolean
hasAnyEventWithModuleDescriptorMatching
(Predicate<com.atlassian.plugin.ModuleDescriptor<?>> anyMatchModuleDescriptorPredicate) SeePluginTransactionEndEvent.hasAnyEventWithModuleDescriptorMatching(Predicate)
int
SeePluginTransactionEndEvent.numberOfEvents()
-
Constructor Details
-
JiraPluginCacheResetEvent
public JiraPluginCacheResetEvent(com.atlassian.plugin.event.events.PluginTransactionEndEvent pluginTransactionEndEvent)
-
-
Method Details
-
getEvents
SeePluginTransactionEndEvent.getUnmodifiableEvents()
-
numberOfEvents
public int numberOfEvents()SeePluginTransactionEndEvent.numberOfEvents()
-
hasAnyEventOfTypeMatching
public <T> boolean hasAnyEventOfTypeMatching(Class<T> eventTypeClass, Predicate<T> anyMatchEventPredicate) SeePluginTransactionEndEvent.hasAnyEventOfTypeMatching(Class, Predicate)
-
hasAnyEventWithModuleDescriptorMatching
public boolean hasAnyEventWithModuleDescriptorMatching(Predicate<com.atlassian.plugin.ModuleDescriptor<?>> anyMatchModuleDescriptorPredicate) SeePluginTransactionEndEvent.hasAnyEventWithModuleDescriptorMatching(Predicate)
-