+ return resolveCookie(actorUtils().getShardStrategyFactory().getStrategy(path).findShard(path));
+ }
+
+ Stream<Long> resolveAllShards() {
+ return actorUtils().getConfiguration().getAllShardNames().stream()
+ .sorted()
+ .map(this::resolveCookie);
+ }
+
+ private @NonNull Long resolveCookie(final String shardName) {
+ final Long cookie = shards.get(shardName);
+ return cookie != null ? cookie : populateShard(shardName);
+ }
+
+ private synchronized @NonNull Long populateShard(final String shardName) {