|
Proton DotNet
|
Simple Ring Queue implementation that has an enforced max size value. More...
Public Member Functions | |
| RingQueue (int queueSize) | |
| Creates a new RingQueue instance with the given fixed queue size. More... | |
| RingQueue (IReadOnlyCollection< T > elements) | |
| Create a new RingQueue instance with elements of the given collection as the initial values contained in the queue. More... | |
| IEnumerator< T > | GetEnumerator () |
| void | CopyTo (Array array, int index) |
| void | CopyTo (T[] array, int index) |
| bool | IsEmpty () |
| Checks if this queue is empty or not. More... | |
| void | Clear () |
| Clears all elements from this queue and resets to an empty state. More... | |
| bool | Offer (T e) |
| Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions. More... | |
| T | Poll () |
| Returns the value at the head of the queue if one is present or returns the default value for the type contained in the queue if empty. More... | |
| T | Poll (Func< T > createOnEmpty) |
| Retrieves and removes the head of this ring queue, and if the queue is currently empty a new instance of the queue type is provided by invoking the given function to supply a default value. More... | |
| T | Peek () |
| bool | Contains (T value) |
| Search the queue for the specified value and returns true if found. More... | |
Public Attributes | |
| int | Count => size |
| bool | IsSynchronized => false |
| object | SyncRoot => backingArray |
Simple Ring Queue implementation that has an enforced max size value.
| T | The type contained in the Queue |
|
inline |
Creates a new RingQueue instance with the given fixed queue size.
| queueSize |
|
inline |
Create a new RingQueue instance with elements of the given collection as the initial values contained in the queue.
| elements |
|
inline |
Clears all elements from this queue and resets to an empty state.
|
inline |
Search the queue for the specified value and returns true if found.
| value | The value whose presence is being queried |
| bool Apache.Qpid.Proton.Utilities.RingQueue< T >.IsEmpty | ( | ) |
Checks if this queue is empty or not.
|
inline |
Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions.
| e | The value to insert into the queue |
|
inline |
|
inline |
Returns the value at the head of the queue if one is present or returns the default value for the type contained in the queue if empty.
|
inline |
Retrieves and removes the head of this ring queue, and if the queue is currently empty a new instance of the queue type is provided by invoking the given function to supply a default value.
| createOnEmpty | Supplier function for value when empty |
1.8.17