Class ShardedDaemonProcessId.MessageExtractor<T>
- java.lang.Object
-
- akka.cluster.sharding.typed.ShardingMessageExtractor<ShardingEnvelope<T>,T>
-
- akka.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 Constructor Description MessageExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
entityId(ShardingEnvelope<T> message)
Extract the entity id from an incomingmessage
.java.lang.String
shardId(java.lang.String entityId)
The shard identifier for a given entity id.T
unwrapMessage(ShardingEnvelope<T> message)
Extract the message to send to the entity from an incomingmessage
.-
Methods inherited from class akka.cluster.sharding.typed.ShardingMessageExtractor
apply, noEnvelope
-
-
-
-
Method Detail
-
entityId
public java.lang.String entityId(ShardingEnvelope<T> message)
Description copied from class:ShardingMessageExtractor
Extract the entity id from an incomingmessage
. Ifnull
is returned the message will beunhandled
, i.e. posted asUnhandled
messages on the event stream- Specified by:
entityId
in classShardingMessageExtractor<ShardingEnvelope<T>,T>
-
shardId
public java.lang.String shardId(java.lang.String entityId)
Description copied from class:ShardingMessageExtractor
The 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:
shardId
in classShardingMessageExtractor<ShardingEnvelope<T>,T>
-
unwrapMessage
public T unwrapMessage(ShardingEnvelope<T> message)
Description copied from class:ShardingMessageExtractor
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.- Specified by:
unwrapMessage
in classShardingMessageExtractor<ShardingEnvelope<T>,T>
-
-