Package-level declarations
Types
Similar to SharedFlow, but completion and error events are also propagated to the downstream subscribers.
A cache of flows which each follow the behaviour of shareInCompleting - i.e. they share a single upstream and pass completion and errors on to the downstream.
An event emitted by MapFlow.asFlowWithState.
Alternate version of CompletingSharedFlowCache that uses a single supplier, defined up front, for all calls to get.
CompletingSharedFlow equivalent of MutableSharedFlow, providing emit and complete functionality.
A cache of SharedFlows keyed by K, sharing a single upstream collection per key across that key's subscribers. Create one with sharedFlowCache, or completingSharedFlowCache for completion/error propagation.
Represents a materialized Flow event.
Functions
Buffers all elements emitted until there is a period of no emissions greater than timeout, then emits all buffered elements within a List.
Buffers all elements emitted until there is a period of no emissions greater than timeoutMillis, then emits all buffered elements within a List.
Creates a CompletingSharedFlowCache backed by a SharedFlowCache: each supplier's terminal completion/error is materialised into the shared stream and rematerialised per subscriber, so - unlike a plain SharedFlow - completion and errors propagate downstream. The entry is evicted as the terminal is published, so a downstream retry re-resolves to a fresh entry (re-running the supplier) rather than re-reading the terminal.
Dematerializes ValueOrCompletions back into their counterpart Flow events.
Specialised version of dematerialize which expects unboxed updates. Type information is lost with materializeUnboxed, so must know what type to cast updates to.
Demultiplexes the elements of the flow based on a key selector function. Each element in the flow is assigned a key based on the result of the key selector function. Elements with the same key are grouped together and then processed by the flow producer function.
Converts this CompletingSharedFlowCache to a LoadingCompletingSharedFlowCache.
Materialize Flow events into ValueOrCompletions that can be sent over the wire, for example.
Specialised version of materialize which does not box updates. Loses type information so corresponding dematerializeUnboxed must know what type to cast updates to.
Create a new, empty, MutableFlowMap.
Create a new MutableFlowMap, with the specified contents.
On an error, Retry on the upstream with an exponential delay between each attempt. Behaviour can be modified by proving onRetry - if a call to this returns false it will stop retrying and propagate the error downstream.
Folds a flow of FlowMapStreamEvents into a flow of Map.
Folds a flow of EntryEvents into a flow of Map.
Folds a flow of EntryEvents into a flow of Map.
Creates a SharedFlowCache - a keyed cache of plain SharedFlows, one shared upstream per key, each evicted once its upstream ends (see SharedFlowCache).
Similar to shareIn, but completions and errors are also propagated to the downstream subscribers.
Throttles the emission of values so that they are at least timeMillis apart. Drops the older value(s) if two or more values are emitted within the time period. The first element is emitted immediately.
If the upstream emits no first event within duration it will emit an TimeoutException error.
If the upstream emits no first event within millis milliseconds it will emit an TimeoutException error.
If the upstream emits no first event within duration it will emit the event default followed by all later emissions from the upstream.
If the upstream emits no first event within duration it will emit the event returned by default followed by all later emissions from the upstream.
Creates a copy of the provided map as a new MutableFlowMap.