|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jjoost.util.Counters
public class Counters
Some default Counter implementations
| Nested Class Summary | |
|---|---|
static class |
Counters.DontCounter
a Counter which ignores all updates to its value and always returns a value less than zero. |
static class |
Counters.SerialCounter
Returns a regular Counter which performs ordinary addition with no concurrency guarantees |
static class |
Counters.ThreadSafeCounter
a thread safe Counter which uses compare and set operations to modify its value |
| Constructor Summary | |
|---|---|
Counters()
|
|
| Method Summary | |
|---|---|
static Counter |
newCounter()
Returns a regular Counter which performs ordinary addition with no concurrency guarantees |
static Counter |
newDoNothingCounter()
Returns a Counter which ignores all updates to its value and always returns a value less than zero. |
static Counter |
newThreadSafeCounter()
Returns a new thread safe Counter which uses compare and set operations to modify its value |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Counters()
| Method Detail |
|---|
public static Counter newThreadSafeCounter()
Counter which uses compare and set operations to modify its value
Counter which uses compare and set operations to modify its valuepublic static Counter newDoNothingCounter()
Counter which ignores all updates to its value and always returns a value less than zero.
Counter which ignores all updates to its value and always returns a value less than zero.public static Counter newCounter()
Counter which performs ordinary addition with no concurrency guarantees
Counter which performs ordinary addition with no concurrency guarantees
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||