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 TypeClassDescriptionclassA Closeable Callback.private static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SharedBlockingCallback.Blockerprivate final Conditionprivate final Conditionprivate final ReentrantLockprivate static final Throwableprivate static final Throwableprivate static final Loggerprivate 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
-