public class SharedBlockingCallback
extends java.lang.Object
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 | Description |
|---|---|---|
class |
SharedBlockingCallback.Blocker |
A Closeable Callback.
|
| Constructor | Description |
|---|---|
SharedBlockingCallback() |
| Modifier and Type | Method | Description |
|---|---|---|
SharedBlockingCallback.Blocker |
acquire() |
|
protected long |
getIdleTimeout() |
Deprecated.
|
protected void |
notComplete(SharedBlockingCallback.Blocker blocker) |
@Deprecated protected long getIdleTimeout()
public SharedBlockingCallback.Blocker acquire() throws java.io.IOException
java.io.IOExceptionprotected void notComplete(SharedBlockingCallback.Blocker blocker)
Copyright © 1995–2018 Webtide. All rights reserved.