Package | Description |
---|---|
com.google.common.util.concurrent |
Concurrency utilities.
|
Modifier and Type | Class and Description |
---|---|
private class |
AbstractService.HasReachedRunningGuard |
private class |
AbstractService.IsStartableGuard |
private class |
AbstractService.IsStoppableGuard |
private class |
AbstractService.IsStoppedGuard |
(package private) class |
ServiceManager.ServiceManagerState.AwaitHealthGuard |
(package private) class |
ServiceManager.ServiceManagerState.StoppedGuard |
Modifier and Type | Field and Description |
---|---|
private Monitor.Guard |
Monitor.activeGuards
The guards associated with this monitor that currently have waiters (
waiterCount > 0 ). |
(package private) Monitor.Guard |
ServiceManager.ServiceManagerState.awaitHealthGuard
Controls how long to wait for all the services to either become healthy or reach a state from
which it is guaranteed that it can never become healthy.
|
private Monitor.Guard |
AbstractService.hasReachedRunning |
private Monitor.Guard |
AbstractService.isStartable |
private Monitor.Guard |
AbstractService.isStoppable |
private Monitor.Guard |
AbstractService.isStopped |
(package private) Monitor.Guard |
Monitor.Guard.next
The next active guard
|
(package private) Monitor.Guard |
ServiceManager.ServiceManagerState.stoppedGuard
Controls how long to wait for all services to reach a terminal state.
|
Modifier and Type | Method and Description |
---|---|
Monitor.Guard |
Monitor.newGuard(java.util.function.BooleanSupplier isSatisfied)
Creates a new guard for this monitor.
|
Modifier and Type | Method and Description |
---|---|
private void |
Monitor.await(Monitor.Guard guard,
boolean signalBeforeWaiting) |
private boolean |
Monitor.awaitNanos(Monitor.Guard guard,
long nanos,
boolean signalBeforeWaiting)
Caller should check before calling that guard is not satisfied.
|
private void |
Monitor.awaitUninterruptibly(Monitor.Guard guard,
boolean signalBeforeWaiting) |
private void |
Monitor.beginWaitingFor(Monitor.Guard guard)
Records that the current thread is about to wait on the specified guard.
|
private void |
Monitor.endWaitingFor(Monitor.Guard guard)
Records that the current thread is no longer waiting on the specified guard.
|
boolean |
Monitor.enterIf(Monitor.Guard guard)
Enters this monitor if the guard is satisfied.
|
boolean |
Monitor.enterIf(Monitor.Guard guard,
java.time.Duration time)
Enters this monitor if the guard is satisfied.
|
boolean |
Monitor.enterIf(Monitor.Guard guard,
long time,
java.util.concurrent.TimeUnit unit)
Enters this monitor if the guard is satisfied.
|
boolean |
Monitor.enterIfInterruptibly(Monitor.Guard guard)
Enters this monitor if the guard is satisfied.
|
boolean |
Monitor.enterIfInterruptibly(Monitor.Guard guard,
java.time.Duration time)
Enters this monitor if the guard is satisfied.
|
boolean |
Monitor.enterIfInterruptibly(Monitor.Guard guard,
long time,
java.util.concurrent.TimeUnit unit)
Enters this monitor if the guard is satisfied.
|
void |
Monitor.enterWhen(Monitor.Guard guard)
Enters this monitor when the guard is satisfied.
|
boolean |
Monitor.enterWhen(Monitor.Guard guard,
java.time.Duration time)
Enters this monitor when the guard is satisfied.
|
boolean |
Monitor.enterWhen(Monitor.Guard guard,
long time,
java.util.concurrent.TimeUnit unit)
Enters this monitor when the guard is satisfied.
|
void |
Monitor.enterWhenUninterruptibly(Monitor.Guard guard)
Enters this monitor when the guard is satisfied.
|
boolean |
Monitor.enterWhenUninterruptibly(Monitor.Guard guard,
java.time.Duration time)
Enters this monitor when the guard is satisfied.
|
boolean |
Monitor.enterWhenUninterruptibly(Monitor.Guard guard,
long time,
java.util.concurrent.TimeUnit unit)
Enters this monitor when the guard is satisfied.
|
int |
Monitor.getWaitQueueLength(Monitor.Guard guard)
Returns an estimate of the number of threads waiting for the given guard to become satisfied.
|
boolean |
Monitor.hasWaiters(Monitor.Guard guard)
Queries whether any threads are waiting for the given guard to become satisfied.
|
private boolean |
Monitor.isSatisfied(Monitor.Guard guard)
Exactly like guard.isSatisfied(), but in addition signals all waiting threads in the (hopefully
unlikely) event that isSatisfied() throws.
|
boolean |
Monitor.tryEnterIf(Monitor.Guard guard)
Enters this monitor if it is possible to do so immediately and the guard is satisfied.
|
void |
Monitor.waitFor(Monitor.Guard guard)
Waits for the guard to be satisfied.
|
boolean |
Monitor.waitFor(Monitor.Guard guard,
java.time.Duration time)
Waits for the guard to be satisfied.
|
boolean |
Monitor.waitFor(Monitor.Guard guard,
long time,
java.util.concurrent.TimeUnit unit)
Waits for the guard to be satisfied.
|
void |
Monitor.waitForUninterruptibly(Monitor.Guard guard)
Waits for the guard to be satisfied.
|
boolean |
Monitor.waitForUninterruptibly(Monitor.Guard guard,
java.time.Duration time)
Waits for the guard to be satisfied.
|
boolean |
Monitor.waitForUninterruptibly(Monitor.Guard guard,
long time,
java.util.concurrent.TimeUnit unit)
Waits for the guard to be satisfied.
|