Class AbstractCheckedFuture<T,E extends Exception>

java.lang.Object
com.google.common.collect.ForwardingObject
com.google.common.util.concurrent.ForwardingFuture<T>
com.google.common.util.concurrent.ForwardingListenableFuture<T>
com.google.common.util.concurrent.ForwardingListenableFuture.SimpleForwardingListenableFuture<T>
org.apache.drill.common.concurrent.AbstractCheckedFuture<T,E>
All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<T>, Future<T>, CheckedFuture<T,E>
Direct Known Subclasses:
RpcCheckedFuture

public abstract class AbstractCheckedFuture<T,E extends Exception> extends com.google.common.util.concurrent.ForwardingListenableFuture.SimpleForwardingListenableFuture<T> implements CheckedFuture<T,E>
A delegating wrapper around a ListenableFuture that adds support for the checkedGet() and checkedGet(long, TimeUnit) methods. This class is moved from Guava, since there it was deleted.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.google.common.util.concurrent.ForwardingListenableFuture

    com.google.common.util.concurrent.ForwardingListenableFuture.SimpleForwardingListenableFuture<V>

    Nested classes/interfaces inherited from class com.google.common.util.concurrent.ForwardingFuture

    com.google.common.util.concurrent.ForwardingFuture.SimpleForwardingFuture<V>
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractCheckedFuture(com.google.common.util.concurrent.ListenableFuture<T> delegate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Exception checking version of Future.get() that will translate InterruptedException, CancellationException and ExecutionException into application-specific exceptions.
    checkedGet(long timeout, TimeUnit unit)
    Exception checking version of Future.get(long, TimeUnit) that will translate InterruptedException, CancellationException and ExecutionException into application-specific exceptions.
    protected abstract E
    Translates from an InterruptedException, CancellationException or ExecutionException thrown by get to an exception of type X to be thrown by checkedGet.

    Methods inherited from class com.google.common.util.concurrent.ForwardingListenableFuture.SimpleForwardingListenableFuture

    delegate

    Methods inherited from class com.google.common.util.concurrent.ForwardingListenableFuture

    addListener

    Methods inherited from class com.google.common.util.concurrent.ForwardingFuture

    cancel, get, get, isCancelled, isDone

    Methods inherited from class com.google.common.collect.ForwardingObject

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.concurrent.Future

    cancel, get, get, isCancelled, isDone

    Methods inherited from interface com.google.common.util.concurrent.ListenableFuture

    addListener