Package com.gigaspaces.lrmi.nio.async
Class LRMIFuture<T>
java.lang.Object
com.gigaspaces.lrmi.nio.async.LRMIFuture<T>
- All Implemented Interfaces:
AsyncFuture<T>,IFuture<T>,Future<T>
A future implementation used to hold delayed result coming from one target. A callback can be
used to signal higher level logic (composite future)
- Since:
- 6.5
- Author:
- asy ronen.
-
Constructor Summary
ConstructorsConstructorDescriptionLRMIFuture(boolean embedded, ClassLoader contextClassLoader) LRMIFuture(ClassLoader contextClassLoader) -
Method Summary
Modifier and TypeMethodDescriptionbooleancancel(boolean mayInterruptIfRunning) get()protected TbooleanbooleanisDone()voidreset(ClassLoader contextClassLoader) voidsetListener(AsyncFutureListener<T> listener) voidThe result has no type since it can be an exception or the real resultvoidsetResultPacket(ReplyPacket<T> replyPacket)
-
Constructor Details
-
LRMIFuture
-
LRMIFuture
-
-
Method Details
-
setListener
- Specified by:
setListenerin interfaceAsyncFuture<T>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceFuture<T>
-
isDone
public boolean isDone() -
get
- Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionException
-
get
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
getResult
- Throws:
ExecutionException
-
reset
-
setResultPacket
-
setResult
Description copied from interface:IFutureThe result has no type since it can be an exception or the real result
-