Package org.redisson.misc
Class ReclosableLatch
-
-
-
- org.redisson.misc.ReclosableLatch
-
-
-
- All Implemented Interfaces:
public class ReclosableLatch extends
A thread gate, that uses an .This implementation allows you to create a latch with a default state (open or closed), and repeatedly open or close the latch.
- Since:
- 4.0
- Author:
- Manik Surtani ([email protected])
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReclosableLatch()
ReclosableLatch(boolean defaultOpen)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
await()
boolean
await(long time, unit)
void
awaitUninterruptibly()
void
close()
boolean
isOpened()
void
open()
toString()
int
tryAcquireShared(int ignored)
boolean
tryReleaseShared(int state)
-
-
-
Method Detail
-
tryAcquireShared
public final int tryAcquireShared(int ignored)
- Overrides:
in class
-
tryReleaseShared
public final boolean tryReleaseShared(int state)
- Overrides:
in class
-
open
public final void open()
-
close
public final void close()
-
isOpened
public boolean isOpened()
-
await
public final void await() throws
- Throws:
-
awaitUninterruptibly
public final void awaitUninterruptibly()
-
await
public final boolean await(long time, unit) throws
- Throws:
-
toString
public toString()
- Overrides:
in class
-
-