Class FixedSizedQueue<T>
Equivalent to System.Collections.Concurrent.ConcurrentQueue<T>, except this does not accept more than the specified maximum size.
Inheritance
System.Object
System.Collections.Concurrent.ConcurrentQueue<T>
FixedSizedQueue<T>
Implements
System.Collections.Concurrent.IProducerConsumerCollection<T>
System.Collections.ICollection
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Inherited Members
System.Collections.Concurrent.ConcurrentQueue<T>.Clear()
System.Collections.Concurrent.ConcurrentQueue<T>.CopyTo(T[], System.Int32)
System.Collections.Concurrent.ConcurrentQueue<T>.GetEnumerator()
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>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.Concurrent.ConcurrentQueue<T>.ToArray()
System.Collections.Concurrent.ConcurrentQueue<T>.TryDequeue(T)
System.Collections.Concurrent.ConcurrentQueue<T>.TryPeek(T)
System.Collections.Concurrent.ConcurrentQueue<T>.Count
System.Collections.Concurrent.ConcurrentQueue<T>.IsEmpty
System.Collections.Concurrent.ConcurrentQueue<T>.System.Collections.ICollection.IsSynchronized
System.Collections.Concurrent.ConcurrentQueue<T>.System.Collections.ICollection.SyncRoot
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
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 |
---|---|---|
System.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 |
---|---|
System.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.ICollection
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable