
public class Semaphore
extends java.util.concurrent.Semaphore
| Constructor and Description |
|---|
Semaphore(int maxSize,
boolean fairness,
PoolStatisticsImpl statistics)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<java.lang.Thread> |
getQueuedThreads() |
void |
release() |
boolean |
tryAcquire(long timeout,
java.util.concurrent.TimeUnit unit) |
public Semaphore(int maxSize,
boolean fairness,
PoolStatisticsImpl statistics)
maxSize - The maxumum sizefairness - The fairnessstatistics - The statistics modulepublic boolean tryAcquire(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
tryAcquire in class java.util.concurrent.Semaphorejava.lang.InterruptedExceptionpublic void release()
release in class java.util.concurrent.Semaphorepublic java.util.Collection<java.lang.Thread> getQueuedThreads()
getQueuedThreads in class java.util.concurrent.SemaphoreCopyright © 2014 IronJacamar (http://www.ironjacamar.org)