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