class InstancePending<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
InstancePending.InstanceHolder<T> |
| Modifier and Type | Field and Description |
|---|---|
private InstancePending.InstanceHolder<T> |
instanceHolder
Piggybacking on
pendingLatch. |
private CountDownLatch |
pendingLatch |
| Constructor and Description |
|---|
InstancePending() |
| Modifier and Type | Method and Description |
|---|---|
(package private) T |
get()
Returns the instance given by the method
prepare(T). |
(package private) void |
prepare(T instance)
Associates the given instance for the method
get(). |
private final CountDownLatch pendingLatch
private InstancePending.InstanceHolder<T> instanceHolder
pendingLatch.InstancePending()
T get()
prepare(T).
This is an uninterruptible blocking method
and the interruption flag will be set just before returning if any.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.