|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jgroups.util.ReentrantLatch
public final class ReentrantLatch
Enables safely locking and unlocking a shared resource, without blocking the calling threads. Blocking is only done on the 'passThrough' method.
| Constructor Summary | |
|---|---|
ReentrantLatch()
Create a new unlocked latch. |
|
ReentrantLatch(boolean locked)
Create a reentrant latch |
|
| Method Summary | |
|---|---|
void |
lock()
Lock the latch. |
void |
passThrough()
Pass through only when the latch becomes unlocked. |
void |
unlock()
Unlock the latch. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReentrantLatch()
public ReentrantLatch(boolean locked)
locked - is the latch to be created locked or not| Method Detail |
|---|
public void lock()
public void unlock()
public void passThrough()
throws java.lang.InterruptedException
java.lang.InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||