public class UpDownLatch
extends java.util.concurrent.locks.AbstractQueuedSynchronizer
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
Constructor and Description |
---|
UpDownLatch(int count) |
Modifier and Type | Method and Description |
---|---|
void |
await() |
void |
countDown() |
void |
countUp() |
int |
getCount() |
int |
tryAcquireShared(int acquires) |
boolean |
tryReleaseShared(int releases) |
acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, isHeldExclusively, isQueued, owns, release, releaseShared, setState, toString, tryAcquire, tryAcquireNanos, tryAcquireSharedNanos, tryRelease
private static final long serialVersionUID
public int getCount()
public int tryAcquireShared(int acquires)
tryAcquireShared
in class java.util.concurrent.locks.AbstractQueuedSynchronizer
public boolean tryReleaseShared(int releases)
tryReleaseShared
in class java.util.concurrent.locks.AbstractQueuedSynchronizer
public void countUp()
public void countDown()
public void await() throws java.lang.InterruptedException
java.lang.InterruptedException