Search Results for

    Show / Hide Table of Contents

    Class Index<TKey, TValue>

    An implementation of a ConcurrentMultiMap - in CLR that would be something like ConcurrentDictionary<TKey, TValue> where TValue is another IEnumerable<T>.

    Add/remove is serialized over the specified key. Reads are fully concurrent.

    Inheritance
    object
    Index<TKey, TValue>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Util
    Assembly: Akka.dll
    Syntax
    public class Index<TKey, TValue> where TValue : IComparable<TValue>
    Type Parameters
    Name Description
    TKey

    TBD

    TValue

    TBD

    Constructors

    | Edit this page View Source

    Index()

    TBD

    Declaration
    public Index()

    Properties

    | Edit this page View Source

    IsEmpty

    Returns true if the index is empty.

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    this[TKey]

    TBD

    Declaration
    public IEnumerable<TValue> this[TKey index] { get; }
    Parameters
    Type Name Description
    TKey index

    TBD

    Property Value
    Type Description
    IEnumerable<TValue>
    | Edit this page View Source

    Keys

    Returns the key set.

    Declaration
    public ICollection<TKey> Keys { get; }
    Property Value
    Type Description
    ICollection<TKey>
    | Edit this page View Source

    Values

    Returns the union of all value sets.

    Declaration
    public HashSet<TValue> Values { get; }
    Property Value
    Type Description
    HashSet<TValue>

    Methods

    | Edit this page View Source

    Clear()

    Removes all keys and values

    Declaration
    public void Clear()
    | Edit this page View Source

    FindValue(TKey, Func<TValue, bool>)

    Find some TValue for the first matching value where the supplied predicate returns true for the given key.

    Declaration
    public TValue FindValue(TKey key, Func<TValue, bool> predicate)
    Parameters
    Type Name Description
    TKey key

    The key to use.

    Func<TValue, bool> predicate

    The predicate to filter values associated with key.

    Returns
    Type Description
    TValue

    The first TValue matching predicate. default(TValue) otherwise.

    | Edit this page View Source

    ForEach(Action<TKey, TValue>)

    Applies the supplied fun to all keys and their values.

    Declaration
    public void ForEach(Action<TKey, TValue> fun)
    Parameters
    Type Name Description
    Action<TKey, TValue> fun

    The function to apply.

    | Edit this page View Source

    Put(TKey, TValue)

    Associates the value of TValue with key of type TKey.

    Declaration
    public bool Put(TKey key, TValue value)
    Parameters
    Type Name Description
    TKey key

    The key to add.

    TValue value

    The value to add.

    Returns
    Type Description
    bool

    true if the value didn't exist for the key previously, and false otherwise.

    | Edit this page View Source

    Remove(TKey)

    Disassociates all values for the specified key.

    Declaration
    public IEnumerable<TValue> Remove(TKey key)
    Parameters
    Type Name Description
    TKey key

    The key we're going to remove.

    Returns
    Type Description
    IEnumerable<TValue>

    An enumerable collection of TValue if the key exists. An empty collection otherwise.

    | Edit this page View Source

    Remove(TKey, TValue)

    Disassociates the value of TValue from the key of TKey.

    Declaration
    public bool Remove(TKey key, TValue value)
    Parameters
    Type Name Description
    TKey key

    The key.

    TValue value

    The value.

    Returns
    Type Description
    bool

    true if value was removed. false otherwise.

    | Edit this page View Source

    RemoveValue(TValue)

    Remove the given value from all keys.

    Declaration
    public void RemoveValue(TValue value)
    Parameters
    Type Name Description
    TValue value

    The value we're going to remove, if it exists for any key.

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET