- public static DistributedDataStore createInstance(String name, SchemaService schemaService){
- ActorSystem actorSystem = ActorSystemFactory.getInstance();
+ private static final String ACTOR_SYSTEM_NAME = "opendaylight-cluster-data";
+ private static final String CONFIGURATION_NAME = "odl-cluster-data";
+ private static ActorSystem actorSystem = null;
+ private static final Set<DistributedDataStore> createdInstances = new HashSet<>(2);
+ private static final Logger LOG = LoggerFactory.getLogger(DistributedDataStoreFactory.class);
+
+ public static synchronized DistributedDataStore createInstance(SchemaService schemaService,
+ DatastoreContext datastoreContext, BundleContext bundleContext) {
+
+ LOG.info("Create data store instance of type : {}", datastoreContext.getDataStoreType());
+
+ DatastoreContextIntrospector introspector = new DatastoreContextIntrospector(datastoreContext);
+ DatastoreContextConfigAdminOverlay overlay = new DatastoreContextConfigAdminOverlay(
+ introspector, bundleContext);
+
+ ActorSystem actorSystem = getActorSystem(bundleContext, datastoreContext.getConfigurationReader());