public final class SynchronizedCounter extends SynchronizedCounter
| Modifier and Type | Field and Description |
|---|---|
private int |
count |
private static Offset |
offset |
| Constructor and Description |
|---|
SynchronizedCounter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
boot() |
int |
increment()
Adds 1 to the counter.
|
int |
peek()
Peek at the counter
|
int |
reset()
Reset the counter to 0, returning its previous value.
|
public SynchronizedCounter()
public static void boot()
public int reset()
SynchronizedCounterreset in class SynchronizedCounterpublic int increment()
SynchronizedCounterincrement in class SynchronizedCounterpublic int peek()
SynchronizedCounterpeek in class SynchronizedCounter