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()
SynchronizedCounter
reset
in class SynchronizedCounter
public int increment()
SynchronizedCounter
increment
in class SynchronizedCounter
public int peek()
SynchronizedCounter
peek
in class SynchronizedCounter