abstract class LavinMQ::Queue::SortedReadyQueue
- LavinMQ::Queue::SortedReadyQueue
- LavinMQ::Queue::ReadyQueue
- Reference
- Object
Direct Known Subclasses
Defined in:
lavinmq/queue/ready.crInstance Method Summary
-
#insert(sp : SegmentPosition)
insert a SP, keeps the deque sorted returns SPs in the deque after the operation
-
#insert(sps : Enumerable(SegmentPosition))
Insert SPs sorted, the array should ideally be sorted too
-
#push(sp : SegmentPosition) : Int32
Pushes a SP to the end of the deque Returns number of SPs in the deque
Instance methods inherited from class LavinMQ::Queue::ReadyQueue
<<(sp)
<<,
[](idx)
[],
[]?(idx)
[]?,
avg_bytesize
avg_bytesize,
bsearch_index(&)
bsearch_index,
bytesize : UInt64
bytesize,
capacity
capacity,
close
close,
compact
compact,
delete(sp) : Bool
delete,
each(start : Int, count : Int, &)each(&) each, empty? empty?, empty_change : Channel(Bool) empty_change, first? first?, includes?(sp) includes?, insert(sp : SegmentPosition)
insert(sps : Enumerable(SegmentPosition)) insert, limit_byte_size(bytesize, & : SegmentPosition -> Nil) limit_byte_size, limit_size(size, & : SegmentPosition -> Nil) limit_size, lock lock, locked_each(&) locked_each, max_bytesize(&blk : SegmentPosition -> _) : UInt32 max_bytesize, min_bytesize(&blk : SegmentPosition -> _) : UInt32 min_bytesize, purge purge, push(sp : SegmentPosition) : Int32 push, shift
shift(& : SegmentPosition -> Bool) shift, shift? shift?, size size, to_a to_a, unlock unlock, with_all(& : Iterator(SegmentPosition) -> Nil) with_all
Constructor methods inherited from class LavinMQ::Queue::ReadyQueue
new(initial_capacity = 1024)
new
Instance Method Detail
def insert(sp : SegmentPosition)
#
Description copied from class LavinMQ::Queue::ReadyQueue
insert a SP, keeps the deque sorted returns SPs in the deque after the operation
def insert(sps : Enumerable(SegmentPosition))
#
Insert SPs sorted, the array should ideally be sorted too
def push(sp : SegmentPosition) : Int32
#
Description copied from class LavinMQ::Queue::ReadyQueue
Pushes a SP to the end of the deque Returns number of SPs in the deque