com.sun.grizzly.util
Class FutureImpl<R>
java.lang.Object
com.sun.grizzly.util.FutureImpl<R>
- All Implemented Interfaces:
- Future<R>
public class FutureImpl<R>
- extends Object
- implements Future<R>
Default Future
implementation
- Author:
- Alexey Stashok
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
result
protected R result
FutureImpl
public FutureImpl()
FutureImpl
public FutureImpl(Object sync)
getResult
public R getResult()
setResult
public void setResult(R result)
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancel
in interface Future<R>
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interface Future<R>
isDone
public boolean isDone()
- Specified by:
isDone
in interface Future<R>
get
public R get()
throws InterruptedException,
ExecutionException
- Specified by:
get
in interface Future<R>
- Throws:
InterruptedException
ExecutionException
get
public R get(long timeout,
TimeUnit unit)
throws InterruptedException,
ExecutionException,
TimeoutException
- Specified by:
get
in interface Future<R>
- Throws:
InterruptedException
ExecutionException
TimeoutException
setException
public void setException(Throwable failure)
notifyHaveResult
protected void notifyHaveResult()
Copyright © 2012 Oracle Corporation. All Rights Reserved.