Package org.eclipse.jetty.util
Class SharedBlockingCallback
java.lang.Object
org.eclipse.jetty.util.SharedBlockingCallback
- Direct Known Subclasses:
HttpOutput.WriteBlocker
Provides a reusable
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(); } }
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
A Closeable Callback.private static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SharedBlockingCallback.Blocker
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
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LOG
-
IDLE
-
SUCCEEDED
-
FAILED
-
_lock
-
_idle
-
_complete
-
_blocker
-
-
Constructor Details
-
SharedBlockingCallback
public SharedBlockingCallback()
-
-
Method Details
-
getIdleTimeout
Deprecated. -
acquire
- Throws:
IOException
-
fail
-