|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.concurrent.FutureTask<R>
org.glassfish.grizzly.impl.SafeFutureImpl<R>
public class SafeFutureImpl<R>
Safe FutureImpl implementation.
(Based on the JDK FutureTask)
Future| Constructor Summary | |
|---|---|
SafeFutureImpl()
Creates SafeFutureImpl |
|
| Method Summary | ||
|---|---|---|
static
|
create()
Construct SafeFutureImpl. |
|
void |
failure(Throwable failure)
Notify about the failure, occurred during asynchronous operation execution. |
|
R |
getResult()
Get current result value without any blocking. |
|
void |
markForRecycle(boolean recycleResult)
Mark GrizzlyFuture as recycleable, so once result will come - GrizzlyFuture object will be recycled and returned to a thread local object pool. |
|
void |
recycle()
|
|
void |
recycle(boolean recycleResult)
Recycle GrizzlyFuture now. |
|
void |
result(R result)
Set the result value and notify about operation completion. |
|
| Methods inherited from class java.util.concurrent.FutureTask |
|---|
cancel, done, get, get, isCancelled, isDone, run, runAndReset, set, setException |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.concurrent.Future |
|---|
cancel, get, get, isCancelled, isDone |
| Constructor Detail |
|---|
public SafeFutureImpl()
| Method Detail |
|---|
public static <R> SafeFutureImpl<R> create()
SafeFutureImpl.
public void result(R result)
result in interface FutureImpl<R>result - the result valuepublic void failure(Throwable failure)
failure in interface FutureImpl<R>failure - public void markForRecycle(boolean recycleResult)
GrizzlyFuture
markForRecycle in interface GrizzlyFuture<R>recycleResult - if true - the GrizzlyFuture result,
if it support recycleable mechanism, will be also recycled together
with this GrizzlyFuture object.public void recycle(boolean recycleResult)
GrizzlyFuture
recycle in interface GrizzlyFuture<R>recycleResult - if true - the GrizzlyFuture result,
if it support recycleable mechanism, will be also recycled together
with this GrizzlyFuture object.public void recycle()
recycle in interface Cacheablepublic R getResult()
FutureImpl
getResult in interface FutureImpl<R>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||