Show / Hide Table of Contents

Class FixedSizedQueue<T>

Equivalent to ConcurrentQueue<T>, except this does not accept more than the specified maximum size.

Inheritance
Object
ConcurrentQueue<T>
FixedSizedQueue<T>
Implements
System.Collections.Concurrent.IProducerConsumerCollection<T>
ICollection
System.Collections.Generic.IReadOnlyCollection<T>
IEnumerable<T>
IEnumerable
Inherited Members
ConcurrentQueue<T>.Clear()
ConcurrentQueue<T>.CopyTo(T[], Int32)
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)
ConcurrentQueue<T>.IEnumerable.GetEnumerator()
System.Collections.Concurrent.ConcurrentQueue<T>.ToArray()
ConcurrentQueue<T>.TryDequeue(T)
ConcurrentQueue<T>.TryPeek(T)
ConcurrentQueue<T>.Count
System.Collections.Concurrent.ConcurrentQueue<T>.IsEmpty
System.Collections.Concurrent.ConcurrentQueue<T>.System.Collections.ICollection.IsSynchronized
ConcurrentQueue<T>.ICollection.SyncRoot
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, 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 Source

FixedSizedQueue(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 Source

Size

Gets the fixed size of the FixedSizedQueue<T>.

Declaration
public int Size { get; }
Property Value
Type Description
Int32

Methods

| Improve this Doc View Source

Enqueue(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
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium