View Javadoc

1   package com.atlassian.plugin.webresource;
2   
3   /**
4    * @since 2.11.0
5    */
6   public interface WebResourceBatchingStateCounter
7   {
8       /***
9        * Gets batching state counter. This counter increments every time there is a state change in any plugin
10       * inside the plugin framework such as a plugin being disabled or a new plugin being installed.
11       * This counter thus can be used to determine the validity of the current batch resources since a disabling/
12       * enabling/upgrade of a plugin can result in relevant resources being updated or inserted into the batch.
13       *
14       * @return batching state counter
15       */
16      long getBatchingStateCounter();
17  
18      /**
19       * Increment of the counter. This is often useful when there is a need to flush the batch resources
20       * explicitly as it is known that the current batch resources will be no longer relevant and that the plugins
21       * framework will not be notified by any kind of plugin event. An example is when there is a change in
22       * system theme which does not involve loading/unloading of plugins.
23       */
24      void incrementCounter();
25  }