Class FixedSizedQueue<T>
Equivalent to ConcurrentQueue<T>, except this does not accept more than the specified maximum size.
Implements
System.Collections.Concurrent.IProducerConsumerCollection<T>
System.Collections.Generic.IReadOnlyCollection<T>
IEnumerable<T>
Inherited Members
System.Collections.Concurrent.ConcurrentQueue<T>.System.Collections.Concurrent.IProducerConsumerCollection<T>.TryAdd(T)
System.Collections.Concurrent.ConcurrentQueue<T>.System.Collections.Concurrent.IProducerConsumerCollection<T>.TryTake(T)
System.Collections.Concurrent.ConcurrentQueue<T>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.Concurrent.ConcurrentQueue<T>.ToArray()
System.Collections.Concurrent.ConcurrentQueue<T>.IsEmpty
System.Collections.Concurrent.ConcurrentQueue<T>.System.Collections.ICollection.IsSynchronized
System.Object.GetType()
System.Object.ToString()
Namespace: Libplanet.Common
Assembly: Libplanet.Common.dll
Syntax
public class FixedSizedQueue<T> : ConcurrentQueue<T>, IProducerConsumerCollection<T>, ICollection, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
Name | Description |
---|---|
T | Specifies the type of elements in the queue. |
Constructors
| Improve this Doc View SourceFixedSizedQueue(Int32)
Creates a new instance of the FixedSizedQueue<T>
with the specified size
.
Declaration
public FixedSizedQueue(int size)
Parameters
Type | Name | Description |
---|---|---|
Int32 | size | The maximum size of the FixedSizedQueue<T>. |
Properties
| Improve this Doc View SourceSize
Gets the fixed size of the FixedSizedQueue<T>.
Declaration
public int Size { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceEnqueue(T)
Adds an object at the end of the FixedSizedQueue<T>.
Declaration
public void Enqueue(T obj)
Parameters
Type | Name | Description |
---|---|---|
T | obj | The object to add at the end of the FixedSizedQueue<T>. |
Implements
System.Collections.Concurrent.IProducerConsumerCollection<T>
System.Collections.Generic.IReadOnlyCollection<T>