- public DistributedDataStore(ActorSystem actorSystem, String type) {
- this(new ActorContext(actorSystem, actorSystem.actorOf(ShardManager.props(type))), type);
+ private SchemaContext schemaContext;
+
+ public DistributedDataStore(ActorSystem actorSystem, String type, ClusterWrapper cluster,
+ Configuration configuration, InMemoryDOMDataStoreConfigProperties dataStoreProperties) {
+ Preconditions.checkNotNull(actorSystem, "actorSystem should not be null");
+ Preconditions.checkNotNull(type, "type should not be null");
+ Preconditions.checkNotNull(cluster, "cluster should not be null");
+ Preconditions.checkNotNull(configuration, "configuration should not be null");
+
+
+ String shardManagerId = ShardManagerIdentifier.builder().type(type).build().toString();
+
+ LOG.info("Creating ShardManager : {}", shardManagerId);
+
+ this.actorContext = new ActorContext(actorSystem, actorSystem
+ .actorOf(ShardManager.props(type, cluster, configuration, dataStoreProperties),
+ shardManagerId ), cluster, configuration);