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.Semaphore
java.lang.InterruptedException
public void release()
release
in class java.util.concurrent.Semaphore
public java.util.Collection<java.lang.Thread> getQueuedThreads()
getQueuedThreads
in class java.util.concurrent.Semaphore
Copyright © 2014 IronJacamar (http://www.ironjacamar.org)