He-Pin commented on code in PR #1246: URL: https://github.com/apache/pekko/pull/1246#discussion_r1546066970
########## cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategy.scala: ########## @@ -44,6 +45,21 @@ object ExternalShardAllocationStrategy { type ShardRegion = ActorRef + /** + * Scala API: Create an [[ExternalShardAllocationStrategy]] + */ + def apply(systemProvider: ClassicActorSystemProvider, typeName: String)( + implicit timeout: Timeout = 5.seconds): ExternalShardAllocationStrategy = + new ExternalShardAllocationStrategy(systemProvider, typeName)(timeout) + + /** + * Java API: Create an [[ExternalShardAllocationStrategy]] + */ + @varargs + def create(systemProvider: ClassicActorSystemProvider, typeName: String, duration: java.time.Duration) + : ExternalShardAllocationStrategy = + this.apply(systemProvider, typeName)(Timeout.create(duration)) Review Comment: 1. remove `@varargs` ,which is not needed. 2. the `Timeout.create(duration)` can use `duration.asScala` I think. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For additional commands, e-mail: notifications-h...@pekko.apache.org