Class DefaultCounter
java.lang.Object
com.atlassian.confluence.plugin.webresource.DefaultCounter
- All Implemented Interfaces:
Counter
Default implementation of a counter stores its data in
PluginSettingsFactory by a supplied key.
This implementation is not thread safe as the impact of using an outdated counter value, or over-updating the counter is non-terminal.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCounter(String key, com.atlassian.sal.api.pluginsettings.PluginSettingsFactory pluginSettingsFactory) -
Method Summary
Modifier and TypeMethodDescriptionintGet the resource countervoidUpdate the resource counter
-
Constructor Details
-
DefaultCounter
public DefaultCounter(String key, com.atlassian.sal.api.pluginsettings.PluginSettingsFactory pluginSettingsFactory) - Since:
- 8.6
-
-
Method Details
-
getCounter
public int getCounter()Description copied from interface:CounterGet the resource counter- Specified by:
getCounterin interfaceCounter
-
updateCounter
public void updateCounter()Description copied from interface:CounterUpdate the resource counter- Specified by:
updateCounterin interfaceCounter
-