OpenBlobForWriteResponse


@ExperimentalAppSearchApi
public final class OpenBlobForWriteResponse implements Closeable


The response to provide batch operation results of openBlobForWriteAsync.

This class is used to retrieve the result of a batch write operation on a collection of blob handles.

The returned android.os.ParcelFileDescriptor must be closed after use to avoid resource leaks. Failing to close the descriptor will result in system resource exhaustion, as each open android.os.ParcelFileDescriptor occupies a limited file descriptor in the system.

Summary

Public methods

void
@NonNull AppSearchBatchResult<AppSearchBlobHandleParcelFileDescriptor>

Returns the AppSearchBatchResult object containing the results of the write blob for write operation for each AppSearchBlobHandle.

void
writeToParcel(@NonNull Parcel dest, int flags)

To be implemented by child classes.

Constants

CREATOR

Added in 1.1.0
public static final @NonNull Parcelable.Creator<OpenBlobForWriteResponseCREATOR

Public constructors

OpenBlobForWriteResponse

Added in 1.1.0
public OpenBlobForWriteResponse(
    @NonNull AppSearchBatchResult<AppSearchBlobHandleParcelFileDescriptor> result
)

Creates a OpenBlobForWriteResponse with given AppSearchBatchResult.

Public methods

close

Added in 1.1.0
public void close()

getResult

Added in 1.1.0
public @NonNull AppSearchBatchResult<AppSearchBlobHandleParcelFileDescriptorgetResult()

Returns the AppSearchBatchResult object containing the results of the write blob for write operation for each AppSearchBlobHandle.

Returns
@NonNull AppSearchBatchResult<AppSearchBlobHandleParcelFileDescriptor>

A AppSearchBatchResult maps AppSearchBlobHandles which is a unique identifier for a specific blob being committed to the outcome of that write operation. If the operation was successful, the result for that handle is ParcelFileDescriptor; if there was an error, the result contains an AppSearchResult with details of the failure.

writeToParcel

Added in 1.1.0
public void writeToParcel(@NonNull Parcel dest, int flags)

To be implemented by child classes.

This is purely for code sync purpose. Have writeToParcel here so we can keep "@Override" in child classes.