- @Override
- public java.lang.AutoCloseable createInstance() {
- final ActorSystem actorSystem = ActorSystem.create("opendaylight-cluster", ConfigFactory
- .load().getConfig("ODLCluster"));
- final DistributedDataStore operationalStore = new DistributedDataStore(actorSystem, "operational");
- getSchemaServiceDependency().registerSchemaServiceListener(operationalStore);
-
- final class AutoCloseableDistributedDataStore implements AutoCloseable {
-
- @Override
- public void close() throws Exception {
- actorSystem.shutdown();
- }
+ @Override
+ public java.lang.AutoCloseable createInstance() {
+
+ OperationalProperties props = getOperationalProperties();
+ if(props == null) {
+ props = new OperationalProperties();
+ }
+
+ return DistributedDataStoreFactory.createInstance("operational",
+ getOperationalSchemaServiceDependency(),
+ new DistributedDataStoreProperties(
+ props.getMaxShardDataChangeExecutorPoolSize().getValue(),
+ props.getMaxShardDataChangeExecutorQueueSize().getValue(),
+ props.getMaxShardDataChangeListenerQueueSize().getValue(),
+ props.getShardTransactionIdleTimeoutInMinutes().getValue(),
+ props.getOperationTimeoutInSeconds().getValue()));