FixedSizeHashQueue
QuantConnect.Util.FixedSizeHashQueue
FixedSizeHashQueue(size: int)
Bases: Generic[QuantConnect_Util_FixedSizeHashQueue_T], Object, Iterable[QuantConnect_Util_FixedSizeHashQueue_T]
Provides an implementation of an add-only fixed length, unique queue system
Initializes a new instance of the FixedSizeHashQueue{T} class
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
size
|
int
|
The maximum number of items to hold |
required |
__iter__
__iter__() -> (
Iterator[QuantConnect_Util_FixedSizeHashQueue_T]
)
add
add(item: QuantConnect_Util_FixedSizeHashQueue_T) -> bool
Returns true if the item was added and didn't already exists
contains
contains(
item: QuantConnect_Util_FixedSizeHashQueue_T,
) -> bool
Returns true if the specified item exists in the collection
dequeue
dequeue() -> QuantConnect_Util_FixedSizeHashQueue_T
Dequeues and returns the next item in the queue
get_enumerator
get_enumerator() -> (
IEnumerator[QuantConnect_Util_FixedSizeHashQueue_T]
)
Returns an enumerator that iterates through the collection.
Returns:
| Type | Description |
|---|---|
IEnumerator[QuantConnect_Util_FixedSizeHashQueue_T]
|
A System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection. |
try_peek
try_peek(
item: Optional[QuantConnect_Util_FixedSizeHashQueue_T],
) -> Tuple[bool, QuantConnect_Util_FixedSizeHashQueue_T]
Tries to inspect the first item in the queue