ArrayIndexedPriorityFixedBatchQueue

class ArrayIndexedPriorityFixedBatchQueue<T>(batchSize: Int, delegate: ArrayIndexedPriorityQueue<T> = ArrayIndexedPriorityQueue()) : Scheduler<T> , BatchedScheduler<T>

Batched extension for ArrayIndexedPriorityQueue. This implementation presents fixed size batches.

Parameters

concentration type

Constructors

Link copied to clipboard
constructor(batchSize: Int, delegate: ArrayIndexedPriorityQueue<T> = ArrayIndexedPriorityQueue())

Functions

Link copied to clipboard
open override fun addReaction(reaction: Actionable<T>)

Adds a reaction to the data structure.

Link copied to clipboard
open override fun getNext(): Actionable<T>

Allows to access the next reaction to be executed.

Link copied to clipboard
open override fun getNextBatch(): List<Actionable<T>>

Retrieve the next scheduled batch of reactions.

Link copied to clipboard
open override fun removeReaction(reaction: Actionable<T>)

Removes a reaction from the structure. If the reaction is not present, nothing is done and an Exception is thrown.

Link copied to clipboard
open override fun updateReaction(reaction: Actionable<T>)

Notifies the structure that the reaction r has changed. The whole structure will be rearranged to ensure consistency.