Package akka.cluster.sharding
Interface ShardRegion.MessageExtractor
-
- All Known Implementing Classes:
ShardRegion.HashCodeMessageExtractor
- Enclosing class:
- ShardRegion
public static interface ShardRegion.MessageExtractor
Extract the entity id from an incomingmessage
. Ifnull
is returned the message will beunhandled
, i.e. posted asUnhandled
messages on the event stream
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
entityId(java.lang.Object message)
java.lang.Object
entityMessage(java.lang.Object message)
Extract the message to send to the entity from an incomingmessage
.java.lang.String
shardId(java.lang.Object message)
Extract the shard id from an incomingmessage
.
-
-
-
Method Detail
-
entityId
java.lang.String entityId(java.lang.Object message)
-
entityMessage
java.lang.Object entityMessage(java.lang.Object message)
Extract the message to send to the entity from an incomingmessage
. Note that the extracted message does not have to be the same as the incoming message to support wrapping in message envelope that is unwrapped before sending to the entity actor.- Parameters:
message
- (undocumented)- Returns:
- (undocumented)
-
shardId
java.lang.String shardId(java.lang.Object message)
Extract the shard id from an incomingmessage
. Only messages that passed theentityId(java.lang.Object)
function will be used as input to this function.- Parameters:
message
- (undocumented)- Returns:
- (undocumented)
-
-