com.sun.enterprise.v3.common
Class BooleanLatch

java.lang.Object
  extended by java.util.concurrent.locks.AbstractOwnableSynchronizer
      extended by java.util.concurrent.locks.AbstractQueuedSynchronizer
          extended by com.sun.enterprise.v3.common.BooleanLatch
All Implemented Interfaces:
Serializable

public class BooleanLatch
extends AbstractQueuedSynchronizer

Acts like a CountDownLatch except that it only requires a single signal to fire. Because a latch is non-exclusive, it uses the shared acquire and release methods.

Author:
Jerome Dochez
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer
AbstractQueuedSynchronizer.ConditionObject
 
Constructor Summary
BooleanLatch()
           
 
Method Summary
 boolean isSignalled()
           
 int tryAcquireShared(int ignore)
           
 boolean tryReleaseShared(int ignore)
           
 
Methods inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer
acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedThreads, hasWaiters, isHeldExclusively, isQueued, owns, release, releaseShared, setState, toString, tryAcquire, tryAcquireNanos, tryAcquireSharedNanos, tryRelease
 
Methods inherited from class java.util.concurrent.locks.AbstractOwnableSynchronizer
getExclusiveOwnerThread, setExclusiveOwnerThread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BooleanLatch

public BooleanLatch()
Method Detail

isSignalled

public boolean isSignalled()

tryAcquireShared

public int tryAcquireShared(int ignore)
Overrides:
tryAcquireShared in class AbstractQueuedSynchronizer

tryReleaseShared

public boolean tryReleaseShared(int ignore)
Overrides:
tryReleaseShared in class AbstractQueuedSynchronizer


Copyright © 2012. All Rights Reserved.