composeAsync

abstract fun <V> composeAsync(tile: Tile<V>): Deferred<V>(source)

Returns Mosaic-owned shared work for tile. Callers may await it freely. To stop waiting, cancel your own coroutine or wait operation rather than cancelling the shared Deferred, which would affect other consumers.

Parameters

tile

the Tile to retrieve

Type Parameters

V

the type of the Tile return value


abstract fun <K : Any, V> composeAsync(tile: MultiTile<K, V>, keys: Collection<K>): Map<K, Deferred<V>>(source)

Returns Mosaic-owned shared work for each equal key on tile within this Mosaic. Each key retains one terminal success or failure, including successful nullable values. An omitted provider map entry fails that key; provider failure affects unfinished keys in that physical invocation. Per-key and chunk factories isolate their invocation failures. Successful sibling keys remain cached. Exact physical batch boundaries are not guaranteed. Callers may await results freely. To stop waiting, cancel your own coroutine or wait operation rather than cancelling a shared Deferred, which would affect other consumers.

Parameters

tile

the MultiTile to retrieve

keys

the keys to be retrieved

Type Parameters

K

the type of the MultiTile keys

V

the type of the MultiTile return value


open fun <K : Any, V> composeAsync(tile: MultiTile<K, V>, key: K): Deferred<V>(source)

Returns Mosaic-owned shared work for key. Callers may await it freely. To stop waiting, cancel your own coroutine or wait operation rather than the shared Deferred, which would affect other consumers.

Parameters

tile

the MultiTile to retrieve

key

the single key to be retrieved

Type Parameters

K

the type of the MultiTile keys

V

the type of the MultiTile return value