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
public class InfinitySemaphoreLatch extends AbstractQueuedSynchronizer
Code parts from Manik Surtani ([email protected])- Author:
- Nikita Koksharov
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer
AbstractQueuedSynchronizer.ConditionObject
-
-
Constructor Summary
Constructors Constructor Description InfinitySemaphoreLatch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acquire()
boolean
acquireAmount(int amount)
boolean
awaitUninterruptibly()
void
close()
boolean
isClosed()
boolean
isOpened()
void
release()
String
toString()
int
tryAcquireShared(int ignored)
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
-
-
-
-
Method Detail
-
tryAcquireShared
public final int tryAcquireShared(int ignored)
- Overrides:
tryAcquireShared
in classAbstractQueuedSynchronizer
-
tryReleaseShared
public final boolean tryReleaseShared(int state)
- Overrides:
tryReleaseShared
in classAbstractQueuedSynchronizer
-
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
public String toString()
- Overrides:
toString
in classAbstractQueuedSynchronizer
-
-