ForkPolicy

interface ForkPolicy<T>

Policy for routing entities in a fork node (one-to-many routing). Determines which destination channel receives each entity.

Parameters

T

the type of entities being routed

Inheritors

Functions

Link copied to clipboard
abstract fun allClosed(): Boolean

Checks if all destination channels are closed.

Link copied to clipboard
context(_: Simulator)
open fun initialize(source: PushInputChannel<T>, destinations: List<PushOutputChannel<T>>)

Initializes the policy with the source and destination channels. Sets up initial state and event listeners for channel open/close events.

Link copied to clipboard
abstract fun onChannelClose(channel: PushOutputChannel<T>)

Called when a destination channel closes.

Link copied to clipboard
abstract fun onChannelOpen(channel: PushOutputChannel<T>)

Called when a destination channel opens.

Link copied to clipboard
abstract fun selectChannel(obj: T): PushOutputChannel<T>

Selects the destination channel for an entity.