org.glassfish.grizzly
Interface GrizzlyFuture<R>

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

public interface GrizzlyFuture<R>
extends java.util.concurrent.Future<R>, Cacheable

Author:
Alexey Stashok

Method Summary
 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(boolean recycleResult)
          Recycle GrizzlyFuture now.
 
Methods inherited from interface java.util.concurrent.Future
cancel, get, get, isCancelled, isDone
 
Methods inherited from interface org.glassfish.grizzly.Cacheable
recycle
 

Method Detail

markForRecycle

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. You can consider to use this method, if you're not interested in using this GrizzlyFuture object.

Parameters:
recycleResult - if true - the GrizzlyFuture result, if it support recycleable mechanism, will be also recycled together with this GrizzlyFuture object.

recycle

void recycle(boolean recycleResult)
Recycle GrizzlyFuture now. This method could be used, if you're not interested in using this GrizzlyFuture object, and you're sure this object is not used by any other application part.

Parameters:
recycleResult - if true - the GrizzlyFuture result, if it support recycleable mechanism, will be also recycled together with this GrizzlyFuture object.


Copyright © 2012 Oracle Corporation. All Rights Reserved.