Liferay 7.0-ce-b4

com.liferay.portal.kernel.concurrent
Class FutureConverter<T,V>

java.lang.Object
  extended by com.liferay.portal.kernel.concurrent.FutureConverter<T,V>
All Implemented Interfaces:
Future<T>
Direct Known Subclasses:
NoticeableFutureConverter

public abstract class FutureConverter<T,V>
extends Object
implements Future<T>


Constructor Summary
FutureConverter(Future<V> future)
           
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
protected abstract  T convert(V v)
           
 T get()
           
 T get(long timeout, TimeUnit timeUnit)
           
 boolean isCancelled()
           
 boolean isDone()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FutureConverter

public FutureConverter(Future<V> future)
Method Detail

cancel

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

get

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

get

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

isCancelled

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

isDone

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

convert

protected abstract T convert(V v)
                      throws Throwable
Throws:
Throwable

Liferay 7.0-ce-b4