Class ShardedDaemonProcessId.MessageExtractor<T>
java.lang.Object
org.apache.pekko.cluster.sharding.typed.ShardingMessageExtractor<ShardingEnvelope<T>,T>
org.apache.pekko.cluster.sharding.typed.internal.ShardedDaemonProcessId.MessageExtractor<T>
- Enclosing class:
- ShardedDaemonProcessId
public static final class ShardedDaemonProcessId.MessageExtractor<T>
extends ShardingMessageExtractor<ShardingEnvelope<T>,T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionentityId(ShardingEnvelope<T> message) Extract the entity id from an incomingmessage.The shard identifier for a given entity id.unwrapMessage(ShardingEnvelope<T> message) Extract the message to send to the entity from an incomingmessage.Methods inherited from class org.apache.pekko.cluster.sharding.typed.ShardingMessageExtractor
apply, noEnvelope
-
Constructor Details
-
MessageExtractor
public MessageExtractor()
-
-
Method Details
-
entityId
Description copied from class:ShardingMessageExtractorExtract the entity id from an incomingmessage. Ifnullis returned the message will beunhandled, i.e. posted asUnhandledmessages on the event stream- Specified by:
entityIdin classShardingMessageExtractor<ShardingEnvelope<T>,T>
-
shardId
Description copied from class:ShardingMessageExtractorThe shard identifier for a given entity id. Only messages that passed theShardingMessageExtractor.entityId(E)function will be used as input to this function.- Specified by:
shardIdin classShardingMessageExtractor<ShardingEnvelope<T>,T>
-
unwrapMessage
Description copied from class:ShardingMessageExtractorExtract 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.- Specified by:
unwrapMessagein classShardingMessageExtractor<ShardingEnvelope<T>,T>
-