BatchScope

@HomeExperimentalApi
interface BatchScope


The scope for the lifecycle of a batch. Can be used to add new commands to the batch. Batches are single use, not thread-safe, and will throw an exception if attempted to be used outside of their lifecycle.

Summary

Public functions

DeferredResponse<T>
<T : Any?> add(batchable: Batchable<T>)

Adds a new command to the batch.

Public functions

add

fun <T : Any?> add(batchable: Batchable<T>): DeferredResponse<T>

Adds a new command to the batch.

Parameters
batchable: Batchable<T>

the command to add to the batch.

Returns
DeferredResponse<T>

a response holder which will be populated after the batch completes.