MutableCompletingSharedFlow
CompletingSharedFlow equivalent of MutableSharedFlow, providing emit and complete functionality.
Constructors
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.
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.
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.
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 EntryEvents into a flow of Map.
Folds a flow of EntryEvents into a flow of Map.
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.