Package-level declarations

Types

Link copied to clipboard
class FIFOQueuePolicy<T>(initialContents: Collection<T> = emptyList()) : QueuePolicy<T>

First-In-First-Out (FIFO) queue policy. Entities are dequeued in the order they were enqueued.

Link copied to clipboard
class PriorityQueuePolicy<T : Any>(initialContents: Collection<T> = emptyList(), comparator: Comparator<T>) : QueuePolicy<T>

Priority queue policy. Entities are dequeued according to a priority order defined by the comparator. Lower priority entities (earlier in the comparator order) are dequeued first.

Link copied to clipboard
interface QueuePolicy<T>

Policy for managing queue behavior. Determines how entities are stored and retrieved from a queue. Implementations can provide different ordering strategies (FIFO, priority, random, etc.).

Link copied to clipboard
class RandomQueuePolicy<T>(initialContents: Collection<T> = emptyList()) : QueuePolicy<T>

Random queue policy. Entities are dequeued randomly from the queue.

Link copied to clipboard
data object Token

Sentinel object representing an abstract token. Used in token-based queuing systems for capacity control or access management.

Link copied to clipboard

Token queue policy. Manages a pool of abstract tokens used for flow control. Rather than storing actual entities, tracks token availability. Does not support residence time tracking since tokens are not individual entities.