Deprecated
Callback that can block the thread
while waiting to be completed.
A typical usage pattern is:
void someBlockingCall(Object... args) throws IOException
{
try(Blocker blocker = sharedBlockingCallback.acquire())
{
someAsyncCall(args, blocker);
blocker.block();
}
}
| Modifier and Type | Class and Description |
|---|---|
| public class | SharedBlockingCallback.
A Closeable Callback. |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private SharedBlockingCallback. | |
| private final Condition | |
| private final Condition | |
| private final ReentrantLock | |
| private static final Throwable | |
| private static final Throwable | |
| private static final Logger | |
| private static final Throwable |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public SharedBlockingCallback. | |
| public boolean | |
| protected void |
| _blocker | back to summary |
|---|---|
| private SharedBlockingCallback. | |
| _complete | back to summary |
|---|---|
| private final Condition _complete | |
| _idle | back to summary |
|---|---|
| private final Condition _idle | |
| _lock | back to summary |
|---|---|
| private final ReentrantLock _lock | |
| FAILED | back to summary |
|---|---|
| private static final Throwable FAILED | |
| IDLE | back to summary |
|---|---|
| private static final Throwable IDLE | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| SUCCEEDED | back to summary |
|---|---|
| private static final Throwable SUCCEEDED | |
| SharedBlockingCallback | back to summary |
|---|---|
| public SharedBlockingCallback() | |
| acquire | back to summary |
|---|---|
| public SharedBlockingCallback. | |
| fail | back to summary |
|---|---|
| public boolean fail(Throwable cause) | |
| notComplete | back to summary |
|---|---|
| protected void notComplete(SharedBlockingCallback. | |
Implements Callback because calls to this
callback do not blocak, rather they wakeup the thread that is blocked
in block()