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 Details

    • 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:
      a partial get bulk result
      Throws:
      InterruptedException
      ExecutionException
    • getStatus

      OperationStatus getStatus()
      Gets the status of the operation upon completion.
      Returns:
      the operation status.
    • addListener

      Future<V> addListener(BulkGetCompletionListener listener)
      Add a listener to the future, which will be executed once the operation completes.
      Parameters:
      listener - the listener which will be executed.
      Returns:
      the current future to allow for object-chaining.
    • removeListener

      Future<V> removeListener(BulkGetCompletionListener listener)
      Remove a previously added listener from the future.
      Parameters:
      listener - the previously added listener.
      Returns:
      the current future to allow for object-chaining.