Package com.atlassian.plugin.webresource
Class WebResourceBatchingStateCounterImpl
java.lang.Object
com.atlassian.plugin.webresource.WebResourceBatchingStateCounterImpl
- All Implemented Interfaces:
WebResourceBatchingStateCounter
public class WebResourceBatchingStateCounterImpl
extends Object
implements WebResourceBatchingStateCounter
A ready-to-use implementation of batching state counter. Ready to be plugged into
WebResourceIntegration.- Since:
- 2.11.0
-
Constructor Summary
ConstructorsConstructorDescriptionWebResourceBatchingStateCounterImpl(com.atlassian.plugin.event.PluginEventManager pluginEventManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the instance.longGets batching state counter.voidIncrement of the counter.voidonPluginFrameworkPluginFrameworkShutdown(com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent event) voidonPluginFrameworkStarted(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event) voidonPluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event) voidonPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
-
Constructor Details
-
WebResourceBatchingStateCounterImpl
public WebResourceBatchingStateCounterImpl(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
-
-
Method Details
-
close
public void close()Closes the instance. -
onPluginFrameworkStarted
public void onPluginFrameworkStarted(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event) -
onPluginFrameworkPluginFrameworkShutdown
public void onPluginFrameworkPluginFrameworkShutdown(com.atlassian.plugin.event.events.PluginFrameworkShutdownEvent event) -
onPluginModuleEnabled
public void onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event) -
onPluginModuleDisabled
public void onPluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event) -
getBatchingStateCounter
public long getBatchingStateCounter()Description copied from interface:WebResourceBatchingStateCounterGets batching state counter. This counter increments every time there is a state change in any plugin inside the plugin framework such as a plugin being disabled or a new plugin being installed. This counter thus can be used to determine the validity of the current batch resources since a disabling/ enabling/upgrade of a plugin can result in relevant resources being updated or inserted into the batch.- Specified by:
getBatchingStateCounterin interfaceWebResourceBatchingStateCounter- Returns:
- batching state counter
-
incrementCounter
public void incrementCounter()Description copied from interface:WebResourceBatchingStateCounterIncrement of the counter. This is often useful when there is a need to flush the batch resources explicitly as it is known that the current batch resources will be no longer relevant and that the plugins framework will not be notified by any kind of plugin event. An example is when there is a change in system theme which does not involve loading/unloading of plugins.- Specified by:
incrementCounterin interfaceWebResourceBatchingStateCounter
-