net.spy.memcached.internal
Class BulkGetFuture<T>
java.lang.Object
net.spy.memcached.internal.BulkGetFuture<T>
- Type Parameters:
T
- types of objects returned from the GET
- All Implemented Interfaces:
- Future<Map<String,T>>, BulkFuture<Map<String,T>>
public class BulkGetFuture<T>
- extends Object
- implements BulkFuture<Map<String,T>>
Future for handling results from bulk gets.
Not intended for general use.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BulkGetFuture
public BulkGetFuture(Map<String,Future<T>> m,
Collection<Operation> getOps,
CountDownLatch l)
cancel
public boolean cancel(boolean ign)
- Specified by:
cancel
in interface Future<Map<String,T>>
get
public Map<String,T> get()
throws InterruptedException,
ExecutionException
- Specified by:
get
in interface Future<Map<String,T>>
- Throws:
InterruptedException
ExecutionException
getSome
public Map<String,T> getSome(long to,
TimeUnit unit)
throws InterruptedException,
ExecutionException
- Description copied from interface:
BulkFuture
- 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)
- Specified by:
getSome
in interface BulkFuture<Map<String,T>>
- Returns:
-
- Throws:
InterruptedException
ExecutionException
get
public Map<String,T> get(long to,
TimeUnit unit)
throws InterruptedException,
ExecutionException,
TimeoutException
- Specified by:
get
in interface Future<Map<String,T>>
- Throws:
InterruptedException
ExecutionException
TimeoutException
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interface Future<Map<String,T>>
isDone
public boolean isDone()
- Specified by:
isDone
in interface Future<Map<String,T>>
isTimeout
public boolean isTimeout()
- Specified by:
isTimeout
in interface BulkFuture<Map<String,T>>
- Returns:
- true if timeout was reached, false otherwise