Class Blocker
java.lang.Object
org.eclipse.jetty.util.Blocker
Utility class that provides blocking 
Runnable and Callback
instances.  These can either be shared (and mutually excluded from concurrent usage) or single usage.
The instances are autocloseable and will emit a warning if the instance is not completed within close.
Non shared Runnable
    try(Blocker.Runnable onAction = Blocker.runnable())
    {
        someMethod(onAction);
        onAction.block();
    }
Shared Runnable
    Blocker.SharedRunnable shared = new Blocker.Shared();
    // ...
    try(Blocker.Runnable onAction = shared.runnable())
    {
        someMethod(onAction);
        onAction.block();
    }
Non shared Callback
    try(Blocker.Callback callback = Blocker.callback())
    {
        someMethod(callback);
        callback.block();
    }
Shared Callback
    Blocker.Shared blocker = new Blocker.Shared();
    // ...
    try(Blocker.Callback callback = blocker.callback())
    {
        someMethod(callback);
        callback.block();
    }
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfacestatic classA shared reusable Blocking source. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic <R> RblockWithPromise(long time, TimeUnit unit, Consumer<Blocker.Promise<R>> consumer) static <R> RblockWithPromise(Consumer<Blocker.Promise<R>> consumer) static Blocker.Callbackcallback()static <C> Blocker.Promise<C> promise()static <C> Blocker.Promise<C> static Blocker.Runnablerunnable() 
- 
Constructor Details
- 
Blocker
public Blocker() 
 - 
 - 
Method Details
- 
runnable
 - 
callback
 - 
promise
 - 
promise
 - 
blockWithPromise
- Throws:
 IOException
 - 
blockWithPromise
public static <R> R blockWithPromise(long time, TimeUnit unit, Consumer<Blocker.Promise<R>> consumer) throws IOException, TimeoutException - Throws:
 IOExceptionTimeoutException
 
 -