Package org.redisson.misc
Class InfinitySemaphoreLatch
java.lang.Object
java.util.concurrent.locks.AbstractOwnableSynchronizer
java.util.concurrent.locks.AbstractQueuedSynchronizer
org.redisson.misc.InfinitySemaphoreLatch
- All Implemented Interfaces:
Serializable
Code parts from Manik Surtani ([email protected])
- Author:
- Nikita Koksharov
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer
AbstractQueuedSynchronizer.ConditionObject
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
acquire()
final boolean
acquireAmount
(int amount) final boolean
void
close()
boolean
isClosed()
boolean
isOpened()
final void
release()
toString()
final int
tryAcquireShared
(int ignored) final boolean
tryReleaseShared
(int state) Methods inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer
acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, isHeldExclusively, isQueued, owns, release, releaseShared, setState, tryAcquire, tryAcquireNanos, tryAcquireSharedNanos, tryRelease
Methods inherited from class java.util.concurrent.locks.AbstractOwnableSynchronizer
getExclusiveOwnerThread, setExclusiveOwnerThread
-
Constructor Details
-
InfinitySemaphoreLatch
public InfinitySemaphoreLatch()
-
-
Method Details
-
acquireAmount
public final boolean acquireAmount(int amount) -
acquire
public final boolean acquire() -
release
public final void release() -
isOpened
public boolean isOpened() -
isClosed
public boolean isClosed() -
close
public void close() -
awaitUninterruptibly
public final boolean awaitUninterruptibly() -
toString
- Overrides:
toString
in classAbstractQueuedSynchronizer