Java com.google.common.util.concurrent Monitor fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.util.concurrent Monitor fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.util.concurrent Monitor.

The text is from its open source code.

Constructor

Monitor(boolean fair)
Creates a monitor with the given ordering policy.
Monitor()
Creates a monitor with a non-fair (but fast) ordering policy.

Method

voidenter()
Enters this monitor.
booleanenter(long time, TimeUnit unit)
Enters this monitor.
voidenterWhen(Guard guard)
Enters this monitor when the guard is satisfied.
booleanisOccupiedByCurrentThread()
Returns whether the current thread is occupying this monitor (has entered more times than it has left).
voidleave()
Leaves this monitor.
booleantryEnter()
Enters this monitor if it is possible to do so immediately.
voidwaitFor(Guard guard)
Waits for the guard to be satisfied.