Barrier

public protocol Barrier : AnyObject

An object that will change its state to stop or allow dispatching of events to some dispatchers.

  • The observable of this barrier’s current state for specific dispatcher.

    BarrierState.closed should be emitted to disallow further processing, and BarrierState.open to allow processing again.

    Declaration

    Swift

    func onState(for dispatcherId: String) -> Observable<BarrierState>

    Parameters

    dispatcherId

    id of the Dispatcher whose barrier state is observed

  • States whether or not this Barrier can be bypassed for “flush” events.

    Declaration

    Swift

    var isFlushable: Observable<Bool> { get }

    Return Value

    An Observable that emits true if this Barrier can be bypassed; else false.