|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jgroups.protocols.COUNTER.CounterImpl
protected class COUNTER.CounterImpl
| Field Summary | |
|---|---|
protected java.lang.String |
name
|
| Constructor Summary | |
|---|---|
protected |
COUNTER.CounterImpl(java.lang.String name)
|
| Method Summary | |
|---|---|
long |
addAndGet(long delta)
Atomically adds the given value to the current value. |
boolean |
compareAndSet(long expect,
long update)
Atomically updates the counter using a CAS operation |
long |
decrementAndGet()
Atomically decrements the counter and returns the new value |
long |
get()
Gets the current value of the counter |
java.lang.String |
getName()
|
long |
incrementAndGet()
Atomically increments the counter and returns the new value |
void |
set(long new_value)
Sets the counter to a new value |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.String name
| Constructor Detail |
|---|
protected COUNTER.CounterImpl(java.lang.String name)
| Method Detail |
|---|
public java.lang.String getName()
getName in interface Counterpublic long get()
Counter
get in interface Counterpublic void set(long new_value)
Counter
set in interface Counternew_value - The new value
public boolean compareAndSet(long expect,
long update)
Counter
compareAndSet in interface Counterexpect - The expected value of the counterupdate - The new value of the counter
public long incrementAndGet()
Counter
incrementAndGet in interface Counterpublic long decrementAndGet()
Counter
decrementAndGet in interface Counterpublic long addAndGet(long delta)
Counter
addAndGet in interface Counterdelta - the value to add
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||