API reference
API reference
Select your platform
No SDKs available
No versions available

RingDictionaryBuffer Class

This class will maintain a cache of entries and the oldest ones will expire when it runs out of space. Each time an item is added to a key, that key's freshness is refreshed. Each key is associated with a list of entries.

Constructors

RingDictionaryBuffer ( capacity )
Signature
Meta.Voice.Logging.RingDictionaryBuffer< TKey, TValue >.RingDictionaryBuffer(int capacity)
Parameters
capacity: int

Fields

this[TKey key] : ICollection< TValue >
Signature
ICollection<TValue> Meta.Voice.Logging.RingDictionaryBuffer< TKey, TValue >.this[TKey key]

Methods

Add ( key , value , unique )
Adds an entry to the key. This also updates the "freshness" of the entry.
Signature
bool Meta.Voice.Logging.RingDictionaryBuffer< TKey, TValue >.Add(TKey key, TValue value, bool unique=false)
Parameters
key: TKey  The key.
value: TValue  The value to add.
unique: bool  Will only add the value if it does not already exist.
Returns
bool  True if the key value was added. False otherwise.
Clear ()
Clears the buffer.
Signature
void Meta.Voice.Logging.RingDictionaryBuffer< TKey, TValue >.Clear()
Returns
void
ContainsKey ( key )
Returns true if the key exists in the buffer.
Signature
bool Meta.Voice.Logging.RingDictionaryBuffer< TKey, TValue >.ContainsKey(TKey key)
Parameters
key: TKey  The key to check.
Returns
bool  True if the key exists in the buffer. False otherwise.
Extract ( key )
Drain all the entries from the buffer that match a given key and return them.
Signature
IEnumerable<TValue> Meta.Voice.Logging.RingDictionaryBuffer< TKey, TValue >.Extract(TKey key)
Parameters
key: TKey  The key we are extracting.
Returns
IEnumerable< TValue >  All the entries in the buffer for that specific key.
ExtractAll ()
Drain all the entries from the buffer and return them.
Signature
IEnumerable<TValue> Meta.Voice.Logging.RingDictionaryBuffer< TKey, TValue >.ExtractAll()
Returns
IEnumerable< TValue >  All the entries in the buffer ordered by the key (e.g. correlation IDs).