package typed
- Alphabetic
- Public
- All
Type Members
-
sealed
trait
ClusterShardingQuery extends AnyRef
Protocol for querying sharding state e.g.
Protocol for querying sharding state e.g. A ShardRegion's state
- final class ClusterShardingSettings extends NoSerializationVerificationNeeded
-
final
case class
GetShardRegionState(entityTypeKey: EntityTypeKey[_], replyTo: ActorRef[CurrentShardRegionState]) extends ClusterShardingQuery with Product with Serializable
Query the ShardRegion state for the given entity type key.
Query the ShardRegion state for the given entity type key. This will get the state of the local ShardRegion's state.
-
final
class
HashCodeMessageExtractor[M] extends ShardingMessageExtractor[ShardingEnvelope[M], M]
Default message extractor type, using envelopes to identify what entity a message is for and the hashcode of the entityId to decide which shard an entity belongs to.
Default message extractor type, using envelopes to identify what entity a message is for and the hashcode of the entityId to decide which shard an entity belongs to.
This is recommended since it does not force details about sharding into the entity protocol
- M
The type of message accepted by the entity actor
-
abstract
class
HashCodeNoEnvelopeMessageExtractor[M] extends ShardingMessageExtractor[M, M]
Default message extractor type, using a property of the message to identify what entity a message is for and the hashcode of the entityId to decide which shard an entity belongs to.
Default message extractor type, using a property of the message to identify what entity a message is for and the hashcode of the entityId to decide which shard an entity belongs to.
This is recommended since it does not force details about sharding into the entity protocol
- M
The type of message accepted by the entity actor
-
final
case class
ShardingEnvelope[M](entityId: String, message: M) extends Product with Serializable
Default envelope type that may be used with Cluster Sharding.
Default envelope type that may be used with Cluster Sharding.
Cluster Sharding provides a default HashCodeMessageExtractor that is able to handle these types of messages, by hashing the entityId into into the shardId. It is not the only, but a convenient way to send envelope-wrapped messages via cluster sharding.
The alternative way of routing messages through sharding is to not use envelopes, and have the message types themselves carry identifiers.
-
abstract
class
ShardingMessageExtractor[E, M] extends AnyRef
Entirely customizable typed message extractor.
Entirely customizable typed message extractor. Prefer HashCodeMessageExtractor or HashCodeNoEnvelopeMessageExtractorif possible.
- E
Possibly an Envelope around the messages accepted by the entity actor, is the same as
M
if there is no envelope.- M
The type of message accepted by the entity actor
Value Members
- object ClusterShardingSettings
- object ShardingMessageExtractor