net.spy.memcached.internal
Interface BulkFuture<V>
- Type Parameters:
V -
- All Superinterfaces:
- Future<V>
- All Known Implementing Classes:
- BulkGetFuture
public interface BulkFuture<V>
- extends 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.
|
Method Summary |
V |
getSome(long timeout,
TimeUnit unit)
Wait for the operation to complete and return results
If operation could not complete within specified
timeout, partial result is returned. |
boolean |
isTimeout()
|
isTimeout
boolean isTimeout()
- Returns:
- true if timeout was reached, false otherwise
getSome
V getSome(long timeout,
TimeUnit unit)
throws InterruptedException,
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:
-
- Throws:
InterruptedException
ExecutionException