Class IgniteCacheFutureImpl<V>
- java.lang.Object
-
- org.apache.ignite.internal.util.future.IgniteFutureImpl<V>
-
- org.apache.ignite.internal.processors.cache.IgniteCacheFutureImpl<V>
-
- All Implemented Interfaces:
IgniteFuture<V>
- Direct Known Subclasses:
IgniteFinishedCacheFutureImpl
public class IgniteCacheFutureImpl<V> extends IgniteFutureImpl<V>
Implementation of public API future for cache.
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.util.future.IgniteFutureImpl
defaultExecutor, fut
-
-
Constructor Summary
Constructors Constructor Description IgniteCacheFutureImpl(IgniteInternalFuture<V> fut, Executor defaultExecutor)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> IgniteFuture<T>chain(IgniteClosure<? super IgniteFuture<V>,T> doneCb)Make a chained future to convert result of this future (when complete) into a new format.<T> IgniteFuture<T>chainAsync(IgniteClosure<? super IgniteFuture<V>,T> doneCb, Executor exec)Make a chained future to convert result of this future (when complete) into a new format.protected RuntimeExceptionconvertException(IgniteCheckedException e)Convert internal exception to public exception.-
Methods inherited from class org.apache.ignite.internal.util.future.IgniteFutureImpl
cancel, chainInternal, get, get, get, internalFuture, isCancelled, isDone, listen, listenAsync, toString
-
-
-
-
Constructor Detail
-
IgniteCacheFutureImpl
public IgniteCacheFutureImpl(IgniteInternalFuture<V> fut, Executor defaultExecutor)
Constructor.- Parameters:
fut- Internal future.
-
-
Method Detail
-
chain
public <T> IgniteFuture<T> chain(IgniteClosure<? super IgniteFuture<V>,T> doneCb)
Make a chained future to convert result of this future (when complete) into a new format. It is guaranteed that done callback will be called only ONCE.- Specified by:
chainin interfaceIgniteFuture<V>- Overrides:
chainin classIgniteFutureImpl<V>- Type Parameters:
T- Type of the converted result.- Parameters:
doneCb- Done callback that is applied to this future when it finishes to produce chained future result.- Returns:
- Chained future that finishes after this future completes and done callback is called.
-
chainAsync
public <T> IgniteFuture<T> chainAsync(IgniteClosure<? super IgniteFuture<V>,T> doneCb, Executor exec)
Make a chained future to convert result of this future (when complete) into a new format. It is guaranteed that done callback will be called only ONCE.- Specified by:
chainAsyncin interfaceIgniteFuture<V>- Overrides:
chainAsyncin classIgniteFutureImpl<V>- Type Parameters:
T- Type of the converted result.- Parameters:
doneCb- Done callback that is applied to this future when it finishes to produce chained future result.exec- Executor to run done callback. Cannot benull.- Returns:
- Chained future that finishes after this future completes and done callback is called.
-
convertException
protected RuntimeException convertException(IgniteCheckedException e)
Convert internal exception to public exception.- Overrides:
convertExceptionin classIgniteFutureImpl<V>- Parameters:
e- Internal exception.- Returns:
- Public excpetion.
-
-