RoundRobinPolicy

Round-robin policy. Selects channels in a cyclic order, ensuring fair distribution across available channels. Each time a channel is selected, the pointer advances to the next channel.

Parameters

ChannelT

the type of channel managed by the policy

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun allUnavailable(): Boolean

Checks if all channels are unavailable.

Link copied to clipboard
context(_: Simulator)
open override fun initialize(channels: List<ChannelT>)

Initializes the policy with the list of channels it will manage.

Link copied to clipboard
open override fun onChannelAvailable(channel: ChannelT)

Called when a channel becomes available (open for fork, ready for join).

Link copied to clipboard
open override fun onChannelUnavailable(channel: ChannelT)

Called when a channel becomes unavailable (closed for fork, not ready for join).

Link copied to clipboard
open override fun selectChannel(): ChannelT

Selects a channel from the available channels.