com.atlassian.confluence.plugin.webresource
Class DefaultCounter
java.lang.Object
com.atlassian.confluence.plugin.webresource.DefaultCounter
- All Implemented Interfaces:
- Counter
@NotThreadSafe
public class DefaultCounter
- extends Object
- implements Counter
Default implementation of a counter stores its data in bandana 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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCounter
public DefaultCounter(String key,
BandanaManager bandanaManager)
getCounter
public int getCounter()
- Description copied from interface:
Counter
- Get the resource counter
- Specified by:
getCounter
in interface Counter
updateCounter
public void updateCounter()
- Description copied from interface:
Counter
- Update the resource counter
- Specified by:
updateCounter
in interface Counter