Package org.jgroups.protocols
Class Locking.ClientCondition
- java.lang.Object
-
- org.jgroups.protocols.Locking.ClientCondition
-
- All Implemented Interfaces:
java.util.concurrent.locks.Condition
- Enclosing class:
- Locking
protected class Locking.ClientCondition extends java.lang.Object implements java.util.concurrent.locks.Condition
-
-
Field Summary
Fields Modifier and Type Field Description protected Locking.ClientLocklockprotected java.util.concurrent.atomic.AtomicReference<java.lang.Thread>parkerThis is okay only having 1 since a client condition is 1 per lock_name, thread id combination.protected java.util.concurrent.atomic.AtomicBooleansignaled
-
Constructor Summary
Constructors Constructor Description ClientCondition(Locking.ClientLock lock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidawait()protected voidawait(boolean throwInterrupt)protected longawait(long nanoSeconds)booleanawait(long time, java.util.concurrent.TimeUnit unit)Note this wait will only work correctly if the converted value is less than 292 years.longawaitNanos(long nanosTimeout)voidawaitUninterruptibly()booleanawaitUntil(java.util.Date deadline)voidsignal()voidsignalAll()protected voidsignaled()
-
-
-
Field Detail
-
lock
protected final Locking.ClientLock lock
-
signaled
protected final java.util.concurrent.atomic.AtomicBoolean signaled
-
parker
protected volatile java.util.concurrent.atomic.AtomicReference<java.lang.Thread> parker
This is okay only having 1 since a client condition is 1 per lock_name, thread id combination.
-
-
Constructor Detail
-
ClientCondition
public ClientCondition(Locking.ClientLock lock)
-
-
Method Detail
-
await
public void await() throws java.lang.InterruptedException- Specified by:
awaitin interfacejava.util.concurrent.locks.Condition- Throws:
java.lang.InterruptedException
-
awaitUninterruptibly
public void awaitUninterruptibly()
- Specified by:
awaitUninterruptiblyin interfacejava.util.concurrent.locks.Condition
-
awaitNanos
public long awaitNanos(long nanosTimeout) throws java.lang.InterruptedException- Specified by:
awaitNanosin interfacejava.util.concurrent.locks.Condition- Throws:
java.lang.InterruptedException
-
await
public boolean await(long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedExceptionNote this wait will only work correctly if the converted value is less than 292 years. This is due to the limitation in System.nano and long values that can only store up to 292 years (2263 nanoseconds). For more information please seeSystem.nanoTime()- Specified by:
awaitin interfacejava.util.concurrent.locks.Condition- Throws:
java.lang.InterruptedException
-
awaitUntil
public boolean awaitUntil(java.util.Date deadline) throws java.lang.InterruptedException- Specified by:
awaitUntilin interfacejava.util.concurrent.locks.Condition- Throws:
java.lang.InterruptedException
-
await
protected void await(boolean throwInterrupt) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
await
protected long await(long nanoSeconds) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
signal
public void signal()
- Specified by:
signalin interfacejava.util.concurrent.locks.Condition
-
signalAll
public void signalAll()
- Specified by:
signalAllin interfacejava.util.concurrent.locks.Condition
-
signaled
protected void signaled()
-
-