selinon.executor.time_queue module

A queue that respect timestamps of records that were pushed into it.

class selinon.executor.time_queue.TimeQueue[source]

Bases: object

A queue that respect timestamps of records that were pushed into it.

is_empty()[source]

Check queue emptiness.

Returns:True if queue is empty
pop()[source]

Remove and return the top record in the queue.

Returns:time and record tuple that were stored
push(time, record)[source]

Push record with the given timestamp to queue.

Parameters:
  • time – time of the record
  • record – record to be pushed
top()[source]

Return the top record in the queue, do not remove it from the queue.

Returns:time and record tuple that were stored