public abstract static class Monitor.Guard
extends java.lang.Object
Guard is associated with a single
Monitor. The monitor may check the guard at arbitrary times from any thread occupying
the monitor, so code should not be written to rely on how often a guard might or might not be
checked.
If a Guard is passed into any method of a Monitor other than the one it is
associated with, an IllegalMonitorStateException is thrown.
| Modifier and Type | Field and Description |
|---|---|
(package private) java.util.concurrent.locks.Condition |
condition |
(package private) Monitor |
monitor |
(package private) Monitor.Guard |
next
The next active guard
|
(package private) int |
waiterCount |
| Modifier | Constructor and Description |
|---|---|
protected |
Guard(Monitor monitor) |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
isSatisfied()
Evaluates this guard's boolean condition.
|
final Monitor monitor
final java.util.concurrent.locks.Condition condition
int waiterCount
@CheckForNull Monitor.Guard next
protected Guard(Monitor monitor)
public abstract boolean isSatisfied()