package org.opendaylight.controller.config.yang.config.cluster_admin_provider;
-import com.google.common.base.Preconditions;
-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;
+import org.opendaylight.controller.sal.common.util.NoopAutoCloseable;
public class ClusterAdminProviderModule extends AbstractClusterAdminProviderModule {
public ClusterAdminProviderModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver) {
}
@Override
- public void customValidation() {
- // add custom validation form module attributes here.
+ public boolean canReuseInstance(AbstractClusterAdminProviderModule oldModule) {
+ return true;
}
@Override
public AutoCloseable createInstance() {
- 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;
+ // The ClusterAdminRpcService is created via blueprint so return a noop here for backwards compatibility.
+ return NoopAutoCloseable.INSTANCE;
}
}
\ No newline at end of file