c
akka.cluster.sharding.ShardRegion
HashCodeMessageExtractor
Companion object HashCodeMessageExtractor
abstract class HashCodeMessageExtractor extends MessageExtractor
Convenience implementation of ShardRegion.MessageExtractor that
construct shardId based on the hashCode of the entityId. The number
of unique shards is limited by the given maxNumberOfShards.
- Source
- ShardRegion.scala
Linear Supertypes
Type Hierarchy
Ordering
- Alphabetic
- By Inheritance
Inherited
- HashCodeMessageExtractor
- MessageExtractor
- AnyRef
- Any
Implicitly
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
Visibility
- Public
- All
Abstract Value Members
-
abstract
def
entityId(message: Any): String
Extract the entity id from an incoming
message.Extract the entity id from an incoming
message. Ifnullis returned the message will beunhandled, i.e. posted asUnhandledmessages on the event stream- Definition Classes
- MessageExtractor
Concrete Value Members
-
def
entityMessage(message: Any): Any
Default implementation pass on the message as is.
Default implementation pass on the message as is.
- Definition Classes
- HashCodeMessageExtractor → MessageExtractor
-
def
shardId(message: Any): String
Extract the shard id from an incoming
message.Extract the shard id from an incoming
message. Only messages that passed the #entityId function will be used as input to this function.- Definition Classes
- HashCodeMessageExtractor → MessageExtractor