BatchResult

Kotlin|Java

public final classBatchResult implementsResult


The result of a batch operation. The result status is successful if and only if all results are successful. Individual results can be retrieved usingBatchResultToken objects.

Summary

Public fields

finalStatus

Public methods

Status

Returns the status of this result.

R
<R extends Result>take(BatchResultToken<R> resultToken)

Retrieves a result from the batch.

Public fields

status

public final Status status

Public methods

getStatus

public Status getStatus()

Returns the status of this result. UseisSuccess to determine whether the call was successful, andgetStatusCode to determine what the error cause was.

Certain errors are due to failures that can be resolved by launching a particular intent. The resolution intent is available viagetResolution.

take

public R <R extends Result>take(BatchResultToken<R> resultToken)

Retrieves a result from the batch.

After the result has been retrieved, it is an error to attempt to retrieve it again. It is the responsibility of the caller to release any resources associated with the returned result. Some result types may implementReleasable, in which caserelease should be used to free the associated resources.

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 2024-10-31 UTC.