Class BatchResult<T,E> (2.43.0)
Stay organized with collections
Save and categorize content based on your preferences.
public abstract class BatchResult<T,E>
This class holds a single result of a batch call. The class is not thread-safe.
Type Parameters |
Name |
Description |
T |
|
E |
|
Constructors
BatchResult()
Methods
completed()
public boolean completed()
Returns true
if the batch has been completed and the result is available; false
otherwise.
error(E error)
protected void error(E error)
Sets an error and status as completed. Notifies all callbacks.
Parameter |
Name |
Description |
error |
E
|
get()
Returns the result of this call.
Returns |
Type |
Description |
T |
|
Exceptions |
Type |
Description |
E |
if the batch has not been completed yet
|
notify(BatchResult.Callback<T,E> callback)
public void notify(BatchResult.Callback<T,E> callback)
Adds a callback for the batch operation.
Parameter |
Name |
Description |
callback |
Callback<T,E>
|
success(T result)
protected void success(T result)
Sets a result and status as completed. Notifies all callbacks.
Parameter |
Name |
Description |
result |
T
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-03 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-10-03 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-03 UTC."]]