Table of Contents

Namespace Sportradar.LiveData.Sdk.Services.PriorityQueue

Classes

BinaryHeap

Collection implemented with the properties of a binary heap.

BinaryHeap.BinaryHeapEnumerator

Enumerator for entries in the heap.

BinaryHeap.SyncBinaryHeap

A synchronized BinaryHeap.

LimitedPriorityQueue

Extends basic PriorityQueue implementation by checking the queue capacity limits and lo-hi queue watermarks. Whenever one of those thresholds are breached an OnLimits event is triggered. Lo watermark can be used to detect that a queue is slowly getting filled up and there is still time to react to this. High watermark usually triggers some self-defense mechanism like stopping all incoming message delivery and processing. This is a thread-safe implementation.

LimitedPriorityQueueDelegates

Priority queue event delegates

PriorityQueue

Simple priority queue implementation supporting only fixed number of priorities. Under the hood it is implemented as N x FIFO queue where elements are ordered by time of arrival. This means that PriorityQueueElt comparison operator is not in use here. Might be extended with LimitedPriorityQueue or replaced by SafePriorityQueue. This is a thread-safe implementation.

SafePriorityQueue

Safe priority queue implementation where element priorities are actually not considered. Under the hood this is actually just a wrapper around .Net FIFO Queue where elements are ordered by time of arrival. This means that PriorityQueueElt comparison operator is not in use here. Queue statistics and Limit events are also disabled here. This is a thread-safe implementation.

Interfaces

ILimitedPriorityQueue

Limited priority queue public interface

IPriorityQueue

Generic priority queue interface

Delegates

LimitedPriorityQueueDelegates.QueueLimitDelegate

Delegate accepting queue limit reached/retreated events.