net.spy.memcached.internal
Interface BulkFuture<V>

Type Parameters:
V -
All Superinterfaces:
java.util.concurrent.Future<V>
All Known Implementing Classes:
BulkGetFuture

public interface BulkFuture<V>
extends java.util.concurrent.Future<V>

Additional flexibility for asyncGetBulk

This interface is now returned from all asyncGetBulk methods. Unlike Future.get(long, TimeUnit), getSome(long, TimeUnit) does not throw CheckedOperationTimeoutException, thus allowing retrieval of partial results after timeout occurs. This behavior is especially useful in case of large multi gets.

Author:
boris.partensky@gmail.com

Method Summary
 V getSome(long timeout, java.util.concurrent.TimeUnit unit)
          Wait for the operation to complete and return results If operation could not complete within specified timeout, partial result is returned.
 OperationStatus getStatus()
          Gets the status of the operation upon completion.
 boolean isTimeout()
           
 
Methods inherited from interface java.util.concurrent.Future
cancel, get, get, isCancelled, isDone
 

Method Detail

isTimeout

boolean isTimeout()
Returns:
true if timeout was reached, false otherwise

getSome

V getSome(long timeout,
          java.util.concurrent.TimeUnit unit)
          throws java.lang.InterruptedException,
                 java.util.concurrent.ExecutionException
Wait for the operation to complete and return results If operation could not complete within specified timeout, partial result is returned. Otherwise, the behavior is identical to Future.get(long, TimeUnit)

Parameters:
timeout -
unit -
Returns:
a partial get bulk result
Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException

getStatus

OperationStatus getStatus()
Gets the status of the operation upon completion.

Returns:
the operation status.


Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.