org.jboss.jca.core.connectionmanager.pool.mcp
Class Semaphore

java.lang.Object
  extended by java.util.concurrent.Semaphore
      extended by org.jboss.jca.core.connectionmanager.pool.mcp.Semaphore
All Implemented Interfaces:
Serializable

public class Semaphore
extends Semaphore

A semaphore implementation that supports statistics

Author:
Jesper Pedersen
See Also:
Serialized Form

Constructor Summary
Semaphore(int maxSize, boolean fairness, ManagedConnectionPoolStatisticsImpl statistics)
          Constructor
 
Method Summary
 boolean tryAcquire(long timeout, TimeUnit unit)
          
 
Methods inherited from class java.util.concurrent.Semaphore
acquire, acquire, acquireUninterruptibly, acquireUninterruptibly, availablePermits, drainPermits, getQueuedThreads, getQueueLength, hasQueuedThreads, isFair, reducePermits, release, 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,
                 ManagedConnectionPoolStatisticsImpl statistics)
Constructor

Parameters:
maxSize - The maxumum size
fairness - The fairness
statistics - The statistics module
Method Detail

tryAcquire

public boolean tryAcquire(long timeout,
                          TimeUnit unit)
                   throws InterruptedException

Overrides:
tryAcquire in class Semaphore
Throws:
InterruptedException


Copyright © 2008 Red Hat Middleware LLC (http://www.jboss.com/)