01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.stats.counter;
05:
06: /**
07: * A simple counter
08: */
09: public interface Counter {
10:
11: long increment();
12:
13: long decrement();
14:
15: long getAndSet(long newValue);
16:
17: long getValue();
18:
19: long getMaxValue();
20:
21: long getMinValue();
22:
23: long increment(long amount);
24:
25: long decrement(long amount);
26:
27: void setValue(long newValue);
28:
29: }
|