public abstract static class ShardRegion.HashCodeMessageExtractor extends java.lang.Object implements ShardRegion.MessageExtractor
ShardRegion.MessageExtractor that
construct shardId based on the hashCode of the entityId. The number
of unique shards is limited by the given maxNumberOfShards.| Constructor and Description |
|---|
HashCodeMessageExtractor(int maxNumberOfShards) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
entityMessage(java.lang.Object message)
Default implementation pass on the message as is.
|
java.lang.String |
shardId(java.lang.Object message)
Extract the entity id from an incoming
message. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitentityIdpublic java.lang.Object entityMessage(java.lang.Object message)
entityMessage in interface ShardRegion.MessageExtractormessage - (undocumented)public java.lang.String shardId(java.lang.Object message)
ShardRegion.MessageExtractormessage. Only messages that passed the ShardRegion.MessageExtractor.entityId(java.lang.Object)
function will be used as input to this function.shardId in interface ShardRegion.MessageExtractormessage - (undocumented)