Class BatchResult<T,​E extends BaseServiceException>

  • Type Parameters:
    T - the type of the result
    E - the type of the service-dependent exception thrown when a processing error occurs

    public abstract class BatchResult<T,​E extends BaseServiceException>
    extends Object
    This class holds a single result of a batch call. The class is not thread-safe.
    • Constructor Detail

      • BatchResult

        @InternalApi("This class should only be extended within google-cloud-java")
        protected BatchResult()
    • Method Detail

      • completed

        public boolean completed()
        Returns true if the batch has been completed and the result is available; false otherwise.
      • error

        protected void error​(E error)
        Sets an error and status as completed. Notifies all callbacks.
      • success

        protected void success​(T result)
        Sets a result and status as completed. Notifies all callbacks.