transferum
    Preparing search index...

    Class PollingFlowTransfer<T>

    Output transfer with polling from OutputFlowInterface (e.g., Storage).

    Capabilities: isOutput, isPollingSource, isPullable, isSubscribable, isTriggerable, isGate

    Mechanics:

    1. The constructor accepts config.flow: OutputFlowInterface and config.interval
    2. An internal Ticker (RAFTicker by default) calls trigger() at the specified interval
    3. trigger() — calls flow.read(), writes the result, notifies subscribers
    4. pull() — calls flow.read() directly (without writing to state)
    5. subscribe(handler) — subscribes to periodic updates
    6. activate()/deactivate()/toggle() — control polling
    7. destroy() — stops the ticker, unsubscribes subscribers

    Error handling:

    • If flow.read() throws an exception in trigger() or pull(), onError is called.
    • With onError provided, the exception is suppressed.

    Configuration (PollingFlowTransferConfig):

    • flow: OutputFlowInterface — data source with a read() method
    • interval: number — polling interval (ms)
    • activated: boolean — initial polling state
    • tickerFactory?: TickerFactory — custom ticker factory (default: RAFTicker.factory)
    • onError?: ErrorHandler — error handler

    Difference from PollingSourceTransfer:

    • Uses FlowInterface instead of DataFetcher
    • Convenient for working with Storage (LatestStorage, QueueStorage, StackStorage)

    Use cases:

    • Periodic reading from storage
    • Polling state from shared storage
    • Integration with external sources via FlowInterface

    Type Parameters

    • T

    Hierarchy (View Summary)

    Implements

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