Skip to content

Commit

Permalink
optimized for review
Browse files Browse the repository at this point in the history
  • Loading branch information
Roiocam committed May 13, 2024
1 parent 2a8c169 commit 82ff828
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -426,14 +426,12 @@ class ClusterSharding(system: ExtendedActorSystem) extends Extension {
allocationStrategy: ShardAllocationStrategy,
handOffStopMessage: Any): ActorRef = {

val extractShardId: ShardRegion.ExtractShardId = msg => messageExtractor.shardId(msg)

internalStart(
typeName,
_ => entityProps,
settings,
extractEntityId = extractEntityIdFromExtractor(messageExtractor),
extractShardId = extractShardId,
extractShardId = msg => messageExtractor.shardId(msg),
allocationStrategy = allocationStrategy,
handOffStopMessage = handOffStopMessage)
}
Expand Down Expand Up @@ -626,14 +624,12 @@ class ClusterSharding(system: ExtendedActorSystem) extends Extension {
dataCenter: Optional[String],
messageExtractor: ShardRegion.MessageExtractor): ActorRef = {

val extractShardId: ShardRegion.ExtractShardId = msg => messageExtractor.shardId(msg)

startProxy(
typeName,
Option(role.orElse(null)),
Option(dataCenter.orElse(null)),
extractEntityId = extractEntityIdFromExtractor(messageExtractor),
extractShardId)
msg => messageExtractor.shardId(msg))

}

Expand Down

0 comments on commit 82ff828

Please sign in to comment.