org.glassfish.grizzly.impl
Interface FutureImpl<R>

All Superinterfaces:
Cacheable, java.util.concurrent.Future<R>, GrizzlyFuture<R>
All Known Implementing Classes:
SafeFutureImpl, UnsafeFutureImpl

public interface FutureImpl<R>
extends GrizzlyFuture<R>

Future interface, which has full control over the state.

Author:
Alexey Stashok
See Also:
Future

Method Summary
 void failure(java.lang.Throwable failure)
          Notify about the failure, occurred during asynchronous operation execution.
 R getResult()
          Get current result value without any blocking.
 void result(R result)
          Set the result value and notify about operation completion.
 
Methods inherited from interface org.glassfish.grizzly.GrizzlyFuture
markForRecycle, recycle
 
Methods inherited from interface java.util.concurrent.Future
cancel, get, get, isCancelled, isDone
 
Methods inherited from interface org.glassfish.grizzly.Cacheable
recycle
 

Method Detail

getResult

R getResult()
Get current result value without any blocking.

Returns:
current result value without any blocking.

result

void result(R result)
Set the result value and notify about operation completion.

Parameters:
result - the result value

failure

void failure(java.lang.Throwable failure)
Notify about the failure, occurred during asynchronous operation execution.

Parameters:
failure -


Copyright © 2012 Oracle Corporation. All Rights Reserved.