Example usage for Java com.google.common.util.concurrent Monitor fields, constructors, methods, implement or subclass
The text is from its open source code.
Monitor(boolean fair) Creates a monitor with the given ordering policy. | |
Monitor() Creates a monitor with a non-fair (but fast) ordering policy. |
void | enter() Enters this monitor. |
boolean | enter(long time, TimeUnit unit) Enters this monitor. |
void | enterWhen(Guard guard) Enters this monitor when the guard is satisfied. |
boolean | isOccupiedByCurrentThread() Returns whether the current thread is occupying this monitor (has entered more times than it has left). |
void | leave() Leaves this monitor. |
boolean | tryEnter() Enters this monitor if it is possible to do so immediately. |
void | waitFor(Guard guard) Waits for the guard to be satisfied. |