- actorContext = new ActorContext(actorSystem, createShardManager(actorSystem, cluster, configuration,
- datastoreContext, shardDispatcher, shardManagerId, primaryShardInfoCache), cluster,
- configuration, datastoreContext, primaryShardInfoCache);
+
+ ShardManager.Builder builder = ShardManager.builder().cluster(cluster).configuration(configuration).
+ datastoreContextFactory(datastoreContextFactory).waitTillReadyCountdownLatch(waitTillReadyCountDownLatch).
+ primaryShardInfoCache(primaryShardInfoCache).restoreFromSnapshot(restoreFromSnapshot);
+
+ actorContext = new ActorContext(actorSystem, createShardManager(actorSystem, builder, shardDispatcher,
+ shardManagerId), cluster, configuration, datastoreContextFactory.getBaseDatastoreContext(), primaryShardInfoCache);