Package org.apache.drill.exec.rpc
Class RpcCheckedFuture<T>
java.lang.Object
org.apache.drill.shaded.guava.com.google.common.collect.ForwardingObject
org.apache.drill.shaded.guava.com.google.common.util.concurrent.ForwardingFuture<V>
org.apache.drill.shaded.guava.com.google.common.util.concurrent.ForwardingListenableFuture<V>
org.apache.drill.shaded.guava.com.google.common.util.concurrent.ForwardingListenableFuture.SimpleForwardingListenableFuture<T>
org.apache.drill.common.concurrent.AbstractCheckedFuture<T,RpcException>
org.apache.drill.exec.rpc.RpcCheckedFuture<T>
- All Implemented Interfaces:
Future<T>
,CheckedFuture<T,
,RpcException> DrillRpcFuture<T>
,org.apache.drill.shaded.guava.com.google.common.util.concurrent.ListenableFuture<T>
public class RpcCheckedFuture<T>
extends AbstractCheckedFuture<T,RpcException>
implements DrillRpcFuture<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.shaded.guava.com.google.common.util.concurrent.ForwardingListenableFuture
org.apache.drill.shaded.guava.com.google.common.util.concurrent.ForwardingListenableFuture.SimpleForwardingListenableFuture<V extends Object>
Nested classes/interfaces inherited from class org.apache.drill.shaded.guava.com.google.common.util.concurrent.ForwardingFuture
org.apache.drill.shaded.guava.com.google.common.util.concurrent.ForwardingFuture.SimpleForwardingFuture<V extends Object>
-
Field Summary
Fields inherited from interface org.apache.drill.exec.rpc.DrillRpcFuture
logger
-
Constructor Summary
ConstructorDescriptionRpcCheckedFuture
(org.apache.drill.shaded.guava.com.google.common.util.concurrent.ListenableFuture<T> delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.netty.buffer.ByteBuf
protected RpcException
Translates from anInterruptedException
,CancellationException
orExecutionException
thrown byget
to an exception of typeX
to be thrown bycheckedGet
.void
setBuffer
(io.netty.buffer.ByteBuf buffer) Methods inherited from class org.apache.drill.common.concurrent.AbstractCheckedFuture
checkedGet, checkedGet
Methods inherited from class org.apache.drill.shaded.guava.com.google.common.util.concurrent.ForwardingListenableFuture.SimpleForwardingListenableFuture
delegate
Methods inherited from class org.apache.drill.shaded.guava.com.google.common.util.concurrent.ForwardingListenableFuture
addListener
Methods inherited from class org.apache.drill.shaded.guava.com.google.common.util.concurrent.ForwardingFuture
cancel, get, get, isCancelled, isDone
Methods inherited from class org.apache.drill.shaded.guava.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 org.apache.drill.common.concurrent.CheckedFuture
checkedGet, checkedGet
Methods inherited from interface org.apache.drill.shaded.guava.com.google.common.util.concurrent.ListenableFuture
addListener
-
Constructor Details
-
RpcCheckedFuture
public RpcCheckedFuture(org.apache.drill.shaded.guava.com.google.common.util.concurrent.ListenableFuture<T> delegate)
-
-
Method Details
-
setBuffer
public void setBuffer(io.netty.buffer.ByteBuf buffer) -
mapException
Description copied from class:AbstractCheckedFuture
Translates from anInterruptedException
,CancellationException
orExecutionException
thrown byget
to an exception of typeX
to be thrown bycheckedGet
. Subclasses must implement this method.If
e
is anInterruptedException
, the callingcheckedGet
method has already restored the interrupt after catching the exception. If an implementation ofAbstractCheckedFuture.mapException(Exception)
wishes to swallow the interrupt, it can do so by callingThread.interrupted()
.Subclasses may choose to throw, rather than return, a subclass of
RuntimeException
to allow creating a CheckedFuture that throws both checked and unchecked exceptions.- Specified by:
mapException
in classAbstractCheckedFuture<T,
RpcException>
-
getBuffer
public io.netty.buffer.ByteBuf getBuffer()- Specified by:
getBuffer
in interfaceDrillRpcFuture<T>
-