transferum
    Preparing search index...

    Class AsyncConditionTransfer<T>

    Transfer with asynchronous conditional filtering on input and output.

    Capabilities: isInput, isOutput, isDuplex, isAsyncPushable, isSubscribable

    Mechanics:

    1. shouldAccept(data) — async input filter (if false, data is ignored)
    2. shouldEmit(data) — async output filter (if false, data is not emitted)
    3. asyncPush(data) — await shouldAccept → await shouldEmit → sendState + clear
    4. Predicates can be sync or async (return Promise | boolean)

    Sequence Guard (active when maxConcurrency > 1):

    • Multiple shouldAccept/shouldEmit checks run in parallel (up to maxConcurrency).
    • Emissions to subscribers happen strictly in data-arrival order.
    • shouldEmit receives the operation's local data, not a shared _state.value, so it cannot accidentally inspect another operation's data.
    • When maxConcurrency <= 1, the guard is inactive (no overhead).

    Error handling:

    • If shouldAccept throws an exception, onAcceptError is called.
    • If shouldEmit throws an exception, onEmitError is called.
    • With the corresponding handler provided, the exception is suppressed.
    • When the guard is active, a failed/skipped operation submits a no-emit marker to the queue so that subsequent results are not blocked.

    Configuration (AsyncConditionTransferConfig):

    • shouldAccept?: (data: T) => Promise | boolean
    • shouldEmit?: (data: T) => Promise | boolean
    • onAcceptError?: ErrorHandler
    • onEmitError?: ErrorHandler
    • maxConcurrency?, bufferSize?, onBufferOverflow? (BackpressureConfig)

    Type Parameters

    • T

    Hierarchy (View Summary)

    Implements

    Index
    _state: ProxyReference<T>
    isAsyncPollingProxy: boolean = false
    isAsyncPullable: boolean = false
    isAsyncPushable: true
    isAsyncTriggerable: boolean = false
    isDuplex: true
    isGate: boolean = false
    isInput: true
    isOutput: true
    isPollingProxy: boolean = false
    isPollingSource: boolean = false
    isPullable: boolean = false
    isPushable: boolean = false
    isSubscribable: true
    isTriggerable: boolean = false