Skip to content

Commit eef914b

Browse files
committed
plumb through to the lang dsls
1 parent fe69021 commit eef914b

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/internal/ClusterShardingImpl.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,10 @@ import akka.util.{ ByteString, Timeout }
313313
}
314314
}
315315

316-
def preResolveShard[M, E](entity: scaladsl.Entity[M, E], shard: String): Unit =
316+
override def preResolveShard[M, E](entity: scaladsl.Entity[M, E], shard: String): Unit =
317317
classicSharding.preResolveShard(entity.typeKey.name, shard)
318318

319-
def preResolveShard[M, E](entity: javadsl.Entity[M, E], shard: String): Unit =
319+
override def preResolveShard[M, E](entity: javadsl.Entity[M, E], shard: String): Unit =
320320
classicSharding.preResolveShard(entity.typeKey.name, shard)
321321

322322
override lazy val shardState: ActorRef[ClusterShardingQuery] = {

akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/javadsl/ClusterSharding.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,13 @@ abstract class ClusterSharding {
225225
* The default `ShardAllocationStrategy` is configured by `least-shard-allocation-strategy` properties.
226226
*/
227227
def defaultShardAllocationStrategy(settings: ClusterShardingSettings): ShardAllocationStrategy
228+
229+
/**
230+
* Direct the shard region or proxy actor for the given entity to resolve the location of the given shard
231+
* and cache it. This may result in the shard being allocated on some node in the cluster. No message will
232+
* be sent to any entity within the shard.
233+
*/
234+
def preResolveShard[M, E](entity: Entity[M, E], shard: String): Unit
228235
}
229236

230237
object Entity {

akka-cluster-sharding-typed/src/main/scala/akka/cluster/sharding/typed/scaladsl/ClusterSharding.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,12 @@ trait ClusterSharding extends Extension { javadslSelf: javadsl.ClusterSharding =
232232
*/
233233
@InternalApi private[akka] def asJava: javadsl.ClusterSharding = javadslSelf
234234

235+
/**
236+
* Direct the shard region or proxy actor for the given entity to resolve the location of the given shard
237+
* and cache it. This may result in the shard being allocated on some node in the cluster. No message will
238+
* be sent to any entity within the shard.
239+
*/
240+
def preResolveShard[M, E](entity: Entity[M, E], shard: String): Unit
235241
}
236242

237243
object Entity {

0 commit comments

Comments
 (0)