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, wait
entityId
public java.lang.Object entityMessage(java.lang.Object message)
entityMessage
in interface ShardRegion.MessageExtractor
message
- (undocumented)public java.lang.String shardId(java.lang.Object message)
ShardRegion.MessageExtractor
message
. Only messages that passed the ShardRegion.MessageExtractor.entityId(java.lang.Object)
function will be used as input to this function.shardId
in interface ShardRegion.MessageExtractor
message
- (undocumented)