org.infinispan
Class AsyncReturnValue

java.lang.Object
  extended by org.infinispan.AsyncReturnValue
All Implemented Interfaces:
Future<Object>

public class AsyncReturnValue
extends Object
implements Future<Object>

Wraps up return values for the asunc API

Since:
4.0
Author:
Manik Surtani

Constructor Summary
AsyncReturnValue(Future<Object> networkCallFuture, Object actualReturnValue)
           
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
 Object get()
           
 Object get(long timeout, TimeUnit unit)
           
 boolean isCancelled()
           
 boolean isDone()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncReturnValue

public AsyncReturnValue(Future<Object> networkCallFuture,
                        Object actualReturnValue)
Method Detail

cancel

public boolean cancel(boolean mayInterruptIfRunning)
Specified by:
cancel in interface Future<Object>

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface Future<Object>

isDone

public boolean isDone()
Specified by:
isDone in interface Future<Object>

get

public Object get()
           throws InterruptedException,
                  ExecutionException
Specified by:
get in interface Future<Object>
Throws:
InterruptedException
ExecutionException

get

public Object get(long timeout,
                  TimeUnit unit)
           throws InterruptedException,
                  ExecutionException,
                  TimeoutException
Specified by:
get in interface Future<Object>
Throws:
InterruptedException
ExecutionException
TimeoutException


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.