-/*
- * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-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;
-
-public class ClusterAdminProviderModule extends AbstractClusterAdminProviderModule {
- public ClusterAdminProviderModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public ClusterAdminProviderModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver,
- ClusterAdminProviderModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @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;
- }
-}
\ No newline at end of file