Class CachedResponseFuture

  • All Implemented Interfaces:
    Runnable, Future<Response>, RunnableFuture<Response>

    public class CachedResponseFuture
    extends FutureTask<Response>
    This is a simple no-op FutureTask implementation that simply wraps and returns a cached Response. We provide this wrapping so that no special case code is ever required. Client code can still be written to, for example, block on future get() wait handles. In this case of cached results this will simply return the cached result immediately.

    Author:
    Todd S. Murchison