groovyx.gpars.dataflow.impl
Class ResizeableCountDownLatch.Sync

java.lang.Object
  extended by java.util.concurrent.locks.AbstractOwnableSynchronizer
      extended by java.util.concurrent.locks.AbstractQueuedSynchronizer
          extended by groovyx.gpars.dataflow.impl.ResizeableCountDownLatch.Sync
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
ResizeableCountDownLatch

private static final class ResizeableCountDownLatch.Sync
extends java.util.concurrent.locks.AbstractQueuedSynchronizer

Synchronization control For CountDownLatch. Uses AQS state to represent count.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject
 
Field Summary
private static long serialVersionUID
           
 
Constructor Summary
ResizeableCountDownLatch.Sync(int count)
           
 
Method Summary
 void decreaseCount()
           
(package private)  int getCount()
           
 void increaseCount()
           
 int tryAcquireShared(int acquires)
           
 boolean tryReleaseShared(int releases)
           
 
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
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

ResizeableCountDownLatch.Sync

ResizeableCountDownLatch.Sync(int count)
Method Detail

getCount

int getCount()

tryAcquireShared

public int tryAcquireShared(int acquires)
Overrides:
tryAcquireShared in class java.util.concurrent.locks.AbstractQueuedSynchronizer

tryReleaseShared

public boolean tryReleaseShared(int releases)
Overrides:
tryReleaseShared in class java.util.concurrent.locks.AbstractQueuedSynchronizer

increaseCount

public void increaseCount()

decreaseCount

public void decreaseCount()

Copyright © 2008–2012 Václav Pech. All Rights Reserved.