Java doc sample for consistent hashing router, see #944

* Allow return null as undefined ConsistentHashMapping
This commit is contained in:
Patrik Nordwall 2012-09-17 11:40:06 +02:00
parent d59612609f
commit 48a0fda991
6 changed files with 159 additions and 11 deletions

View file

@ -11,7 +11,6 @@ object ConsistentHashingRouterDocSpec {
//#cache-actor
import akka.actor.Actor
import akka.routing.ConsistentHashingRouter.ConsistentHashable
import akka.routing.ConsistentHashingRouter.ConsistentHashableEnvelope
class Cache extends Actor {
var cache = Map.empty[String, String]

View file

@ -292,10 +292,10 @@ insight into how consistent hashing is implemented.
There is 3 ways to define what data to use for the consistent hash key.
* You can define ``consistentHashRoute`` of the router to map incoming
messages to their consistent hash key. This makes the makes the decision
messages to their consistent hash key. This makes the decision
transparent for the sender.
* The messages may implement ``akka.routing.ConsistentHashable``.
* The messages may implement ``akka.routing.ConsistentHashingRouter.ConsistentHashable``.
The key is part of the message and it's convenient to define it together
with the message definition.