Class OperationFutures


  • public class OperationFutures
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <ResponseT,​MetadataT>
      OperationFuture<ResponseT,​MetadataT>
      immediateOperationFuture​(OperationSnapshot completedSnapshot)
      Creates an already-completed OperationFuture, useful for testing.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • immediateOperationFuture

        public static final <ResponseT,​MetadataT> OperationFuture<ResponseT,​MetadataT> immediateOperationFuture​(OperationSnapshot completedSnapshot)
        Creates an already-completed OperationFuture, useful for testing.

        completedSnapshot.isDone() must return true. The snapshot's getResponse() and getMetadata() must be instances of ResponseT and MetadataT, respectively.