com.atlassian.confluence.plugin.webresource
Class DefaultCounter

java.lang.Object
  extended by com.atlassian.confluence.plugin.webresource.DefaultCounter
All Implemented Interfaces:
Counter
Direct Known Subclasses:
GadgetCounter

@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.


Constructor Summary
DefaultCounter(String key, com.atlassian.bandana.BandanaManager bandanaManager)
           
 
Method Summary
 int getCounter()
          Get the resource counter
 void updateCounter()
          Update the resource counter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCounter

public DefaultCounter(String key,
                      com.atlassian.bandana.BandanaManager bandanaManager)
Method Detail

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


Copyright © 2003-2012 Atlassian. All Rights Reserved.