org.jboss.jca.core.connectionmanager.pool.api

## Class Semaphore

- java.lang.Object
- - java.util.concurrent.Semaphore
  - - org.jboss.jca.core.connectionmanager.pool.api.Semaphore

- All Implemented Interfaces:
    java.io.Serializable

      public class Semaphore
      extends java.util.concurrent.Semaphore

  A semaphore implementation that supports statistics
  Author:
    Jesper Pedersen
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Semaphore(int maxSize, boolean fairness, PoolStatisticsImpl statistics)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Collection<java.lang.Thread>` | `getQueuedThreads()`
    `void` | `release()`
    `boolean` | `tryAcquire(long timeout, java.util.concurrent.TimeUnit unit)`

    - ### Methods inherited from class java.util.concurrent.Semaphore

      `acquire, acquire, acquireUninterruptibly, acquireUninterruptibly, availablePermits, drainPermits, getQueueLength, hasQueuedThreads, isFair, reducePermits, release, toString, tryAcquire, tryAcquire, tryAcquire`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Semaphore

          public Semaphore(int maxSize,
                           boolean fairness,
                           PoolStatisticsImpl statistics)

      Constructor
      Parameters:
        `maxSize` - The maxumum size
        `fairness` - The fairness
        `statistics` - The statistics module

  - ### Method Detail

    - #### tryAcquire

          public boolean tryAcquire(long timeout,
                                    java.util.concurrent.TimeUnit unit)
                             throws java.lang.InterruptedException

      Overrides:
        `tryAcquire` in class `java.util.concurrent.Semaphore`
      Throws:
        `java.lang.InterruptedException`

    - #### release

          public void release()

      Overrides:
        `release` in class `java.util.concurrent.Semaphore`

    - #### getQueuedThreads

          public java.util.Collection<java.lang.Thread> getQueuedThreads()

      Overrides:
        `getQueuedThreads` in class `java.util.concurrent.Semaphore`

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)