|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.lang.ThreadLocal
com.tangosol.util.ThreadGate.ThreadLocalCounter
public static class ThreadGate.ThreadLocalCounter
Specialization of ThreadLocalObject that can be used for efficient thread local long counters.
This class associates a single Long value with the current thread. The Long value may be retrieved, set, removed, incremented, or decremented.
| Constructor Summary | |
|---|---|
ThreadGate.ThreadLocalCounter()
Create a new ThreadLocalCounter with an initial Long value of zero. |
|
| Method Summary | |
|---|---|
long |
decrement()
Decrement the Long value of the ThreadLocalCounter for the current thread by one. |
long |
getCount()
Obtain the long value of the ThreadLocalCounter for the current thread. |
long |
increment()
Increment the Long value of the ThreadLocalCounter for the current thread by one. |
void |
set(Object oValue)
Set the Long value of the ThreadLocalCounter for the current thread. |
void |
setCount(long c)
Set the long value of the ThreadLocalCounter for the current thread. |
| Methods inherited from class java.lang.ThreadLocal |
|---|
get, initialValue, remove |
| Constructor Detail |
|---|
public ThreadGate.ThreadLocalCounter()
| Method Detail |
|---|
public long getCount()
public void setCount(long c)
c - the long counter value for the current threadgetCount(),
set(Object)public long increment()
decrement()public long decrement()
increment()public void set(Object oValue)
set in class ThreadLocaloValue - the Long value for the current thread
ClassCastException - if the supplied value is non-null and
not an instance of Long
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||