Click or drag to resize
Akka.NETConsistentHashingRoutingLogic Class
This class contains logic used by a Router to route a message to a Routee determined using consistent-hashing. This process has the router select a routee based on a message's consistent hash key. There are 3 ways to define the key, which can be used individually or combined to form the key. The ConsistentHashMapping is tried first.
  1. You can define a ConsistentHashMapping or use WithHashMapping(ConsistentHashMapping) of the router to map incoming messages to their consistent hash key. This makes the decision transparent for the sender.
  2. Messages may implement IConsistentHashable. The hash key is part of the message and it's convenient to define it together with the message definition.
  3. The message can be wrapped in a ConsistentHashableEnvelope to define what data to use for the consistent hash key. The sender knows what key to use.
Inheritance Hierarchy
SystemObject
  Akka.RoutingRoutingLogic
    Akka.RoutingConsistentHashingRoutingLogic

Namespace:  Akka.Routing
Assembly:  Akka (in Akka.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax
public sealed class ConsistentHashingRoutingLogic : RoutingLogic

The ConsistentHashingRoutingLogic type exposes the following members.

Constructors
  NameDescription
Public methodConsistentHashingRoutingLogic(ActorSystem)
Initializes a new instance of the ConsistentHashingRoutingLogic class.
Note Note
A ConsistentHashingRoutingLogic configured in this way uses the EmptyConsistentHashMapping as the hash mapping function with a virtual node factor of 0 (zero).
Public methodConsistentHashingRoutingLogic(ActorSystem, Int32, ConsistentHashMapping)
Initializes a new instance of the ConsistentHashingRoutingLogic class.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSelect
Picks a Routee to receive the message.
(Overrides RoutingLogicSelect(Object, Routee).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWithHashMapping
Creates a new ConsistentHashingRoutingLogic router logic with a given ConsistentHashMapping.
Note Note
This method is immutable and returns a new instance of the router.
Top
Extension Methods
See Also