Concurrent |
public class ConcurrentTokenizedPriorityQueue<TKey, TValue, TToken> where TKey : Object, IComparable<TKey>
The ConcurrentTokenizedPriorityQueueTKey, TValue, TToken type exposes the following members.
Name | Description | |
---|---|---|
ConcurrentTokenizedPriorityQueueTKey, TValue, TToken | Initializes a new instance of the ConcurrentTokenizedPriorityQueueTKey, TValue, TToken class. This instance is not configured to generate tokens by itself, thus you must use the TryAdd(..) functions to enqueue items. | |
ConcurrentTokenizedPriorityQueueTKey, TValue, TToken(Int32) | Initializes a new instance of the ConcurrentTokenizedPriorityQueueTKey, TValue, TToken class. This instance is not configured to generate tokens by itself, thus you must use the TryAdd(..) functions to enqueue items. | |
ConcurrentTokenizedPriorityQueueTKey, TValue, TToken(TToken, FuncTToken, TToken) | Initializes a new instance of the ConcurrentTokenizedPriorityQueueTKey, TValue, TToken class. When argument GetNextToken is not null, the priority queue is generating new tokens by itself. In this case you should only use the Enqueue functions to enqueue items. In contrast, when GetNextToken is null, the priority queue is not generating tokens by itself, and you have to use the TryAdd(..) functions to enqueue items. | |
ConcurrentTokenizedPriorityQueueTKey, TValue, TToken(Int32, TToken, FuncTToken, TToken) | Initializes a new instance of the ConcurrentTokenizedPriorityQueueTKey, TValue, TToken class. When argument GetNextToken is not null, the priority queue is generating new tokens by itself. In this case you should only use the Enqueue functions to enqueue items. In contrast, when GetNextToken is null, the priority queue is not generating tokens by itself, and you have to use the Add functions to enqueue items. |
Name | Description | |
---|---|---|
Count | Gets the number of elements in the priority queue. | |
IsEmpty | Gets a value indicating whether the priority queue is empty. |
Name | Description | |
---|---|---|
AddOrUpdate(TToken, TKey, TValue) | Adds a key/value pair associated with a token to the queue (if no such token is already present), or updates the already present key/value pair associated with the provided token. | |
AddOrUpdate(TToken, KeyValuePairTKey, TValue, FuncTToken, KeyValuePairTKey, TValue, KeyValuePairTKey, TValue) | Adds a key/value pair associated with a token to the queue (if no such token is already present), or updates the already present key/value pair associated with the provided token. | |
Clear | Removes all elements from this queue, resulting in an empty queue. | |
ContainsToken | Determines whether an item with the specified associated token exists in the queue. | |
Dequeue | Dequeues the item with minimum key. If the queue is empty, an exception will be thrown. | |
Enqueue | Enqueues an item consisting of a key and a value. The priority queue has to be constructed to generate tokens by itself in order to use this function. Otherwise an exception is thrown. | |
EnqueueOrUpdate(TKey, TValue, TToken) | Adds a key/value pair associated with a token to the queue (if no such token is already present), or updates the already present key/value pair associated with the provided token. | |
EnqueueOrUpdate(KeyValuePairTKey, TValue, TToken, FuncTToken, KeyValuePairTKey, TValue, KeyValuePairTKey, TValue) | Adds a key/value pair associated with a token to the queue (if no such token is already present), or updates the already present key/value pair associated with the provided token. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
ToString | Returns a string that represents the current object. (Inherited from Object) | |
TryAdd | Tries to add the key/value pair associated with the provided token to the queue. The queue must not be configured to generate tokens by itself. | |
TryDecreaseKey | Tries to change the key associated with the provided token. The new key value has to be less than the existing one; otherwise an exception is thrown. | |
TryDequeue | Tries to dequeue the item with minimum key. | |
TryGet(TToken, TKey) | Tries to get the key/value pair that is associated with the provided token. | |
TryGet(TToken, TKey, TValue) | Tries to get the key/value pair that is associated with the provided token. | |
TryIncreaseKey | Tries to change the key associated with the provided token. The new key value has to be greater than the existing one; otherwise an exception is thrown. | |
TryPeek(TKey) | Tries to retrieve the element with minimum key. | |
TryPeek(TKey, TValue) | Tries to retrieve the element with minimum key. | |
TryPeek(TKey, TValue, TToken) | Tries to retrieve the element with minimum key. | |
TryPeekKey | ||
TryRemove(TToken) | Tries to remove the key/value pair associated with the provided token from the queue (independently on the current position of the key/value pair in the queue). | |
TryRemove(TToken, TKey) | Tries to remove the key/value pair associated with the provided token from the queue (independently on the current position of the key/value pair in the queue). | |
TryRemove(TToken, TKey, TValue) | Tries to remove the key/value pair associated with the provided token from the queue (independently on the current position of the key/value pair in the queue). | |
TryUpdateKey | Tries to update the key associated with the provided token. The value is left as is. |