Class BatchResult<T,E> (2.12.0)

publicabstractclassBatchResult<T,E>

This class holds a single result of a batch call. The class is not thread-safe.

Inheritance

java.lang.Object >BatchResult<T,E>

Type Parameters

NameDescription
T
E

Constructors

BatchResult()

protectedBatchResult()

Methods

completed()

publicbooleancompleted()

Returnstrue if the batch has been completed and the result is available;false otherwise.

Returns
TypeDescription
boolean

error(E error)

protectedvoiderror(Eerror)

Sets an error and status as completed. Notifies all callbacks.

Parameter
NameDescription
errorE

get()

publicTget()

Returns the result of this call.

Returns
TypeDescription
T
Exceptions
TypeDescription
E

if the batch has not been completed yet

notify(BatchResult.Callback<T,E> callback)

publicvoidnotify(BatchResult.Callback<T,E>callback)

Adds a callback for the batch operation.

Parameter
NameDescription
callbackCallback<T,E>

success(T result)

protectedvoidsuccess(Tresult)

Sets a result and status as completed. Notifies all callbacks.

Parameter
NameDescription
resultT

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-31 UTC.