package org.opendaylight.controller.config.yang.config.cluster_admin_provider;
import com.google.common.base.Preconditions;
-import org.opendaylight.controller.cluster.datastore.DistributedDataStore;
+import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface;
import org.opendaylight.controller.cluster.datastore.admin.ClusterAdminRpcService;
import org.opendaylight.controller.config.api.DependencyResolver;
import org.opendaylight.controller.config.api.ModuleIdentifier;
@Override
public AutoCloseable createInstance() {
- Preconditions.checkArgument(getConfigDataStoreDependency() instanceof DistributedDataStore,
- "Injected config DOMStore must be an instance of DistributedDataStore");
- Preconditions.checkArgument(getOperDataStoreDependency() instanceof DistributedDataStore,
- "Injected operational DOMStore must be an instance of DistributedDataStore");
- ClusterAdminRpcService service = new ClusterAdminRpcService((DistributedDataStore)getConfigDataStoreDependency(),
- (DistributedDataStore)getOperDataStoreDependency());
+ Preconditions.checkArgument(getConfigDataStoreDependency() instanceof DistributedDataStoreInterface,
+ "Injected config DOMStore must be an instance of DistributedDataStoreInterface");
+ Preconditions.checkArgument(getOperDataStoreDependency() instanceof DistributedDataStoreInterface,
+ "Injected operational DOMStore must be an instance of DistributedDataStoreInterface");
+ ClusterAdminRpcService service = new ClusterAdminRpcService(
+ (DistributedDataStoreInterface)getConfigDataStoreDependency(),
+ (DistributedDataStoreInterface)getOperDataStoreDependency());
service.start(getRpcRegistryDependency());
return service;
}
-}
+}
\ No newline at end of file