|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Gate
The Gate interface acts as an abstraction between the ThreadGate
implementation that precedes JDK 1.5 locks and the ThreadGateLite
that uses the ReentrantReadWriteLock
.
Note: the Gate's method names have been chosen to be backwards compatible with the legacy ThreadGate implementation.
Method Summary | |
---|---|
boolean |
close(long cMillis) Close the gate. |
boolean |
enter(long cMillis) Enter the gate. |
void |
exit() Exit the gate. |
boolean |
isClosed() Determine if any thread has closed the gate. |
boolean |
isClosedByCurrentThread() Determine if the current thread has closed the gate. |
boolean |
isEnteredByCurrentThread() Determines if the current thread has entered the gate and not yet exited. |
void |
open() Re-open the closed gate. |
Method Detail |
---|
boolean close(long cMillis)
open()
method.cMillis
- maximum number of milliseconds to wait; pass -1 to wait indefinitely or 0 to return immediatelyvoid open()
java.lang.IllegalMonitorStateException
- if the gate is not closed or was closed by a different threadboolean enter(long cMillis)
exit()
method.cMillis
- maximum number of milliseconds to wait; pass -1 to wait indefinitely or 0 to return immediatelyvoid exit()
enter(long)
method.java.lang.IllegalMonitorStateException
- if the gate is not entered by the current threadboolean isClosedByCurrentThread()
boolean isEnteredByCurrentThread()
boolean isClosed()
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |