Package akka.routing
Class ConsistentHashingRouter
- java.lang.Object
-
- akka.routing.ConsistentHashingRouter
-
public class ConsistentHashingRouter extends java.lang.ObjectIf you don't define thehashMappingwhen constructing theConsistentHashingRouterthe messages need to implement this interface to define what data to use for the consistent hash key. Note that it's not the hash, but the data to be hashed.If returning an
Array[Byte]or String it will be used as is, otherwise the configuredSerializerwill be applied to the returned data.If messages can't implement this interface themselves, it's possible to wrap the messages in
ConsistentHashingRouter.ConsistentHashableEnvelope, or useConsistentHashingRouter.ConsistentHashableEnvelope
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceConsistentHashingRouter.ConsistentHashablestatic classConsistentHashingRouter.ConsistentHashableEnvelopestatic classConsistentHashingRouter.ConsistentHashableEnvelope$static interfaceConsistentHashingRouter.ConsistentHashMapperstatic classConsistentHashingRouter.emptyConsistentHashMapping$
-
Constructor Summary
Constructors Constructor Description ConsistentHashingRouter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static scala.PartialFunction<java.lang.Object,java.lang.Object>hashMappingAdapter(ConsistentHashingRouter.ConsistentHashMapper mapper)
-
-
-
Method Detail
-
hashMappingAdapter
public static scala.PartialFunction<java.lang.Object,java.lang.Object> hashMappingAdapter(ConsistentHashingRouter.ConsistentHashMapper mapper)
-
-