2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.xsql.rev140626;
10 import org.opendaylight.controller.md.sal.dom.xsql.XSQLAdapter;
11 import org.opendaylight.xsql.XSQLProvider;
13 * @author Sharon Aicler(saichler@gmail.com)
16 * To be removed in Nitrogen
19 public class XSQLModule extends org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.xsql.rev140626.AbstractXSQLModule {
20 private static final long SLEEP_TIME_BEFORE_CREATING_TRANSACTION = 10000;
21 public XSQLModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
22 super(identifier, dependencyResolver);
25 public XSQLModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.xsql.rev140626.XSQLModule oldModule, java.lang.AutoCloseable oldInstance) {
26 super(identifier, dependencyResolver, oldModule, oldInstance);
30 public void customValidation() {
31 // add custom validation form module attributes here.
35 public java.lang.AutoCloseable createInstance() {
36 XSQLAdapter xsqlAdapter = XSQLAdapter.getInstance();
37 getSchemaServiceDependency().registerSchemaContextListener(xsqlAdapter);
38 xsqlAdapter.setDataBroker(getAsyncDataBrokerDependency());
39 final XSQLProvider p = new XSQLProvider();
40 Runnable runthis = new Runnable() {
43 try{Thread.sleep(SLEEP_TIME_BEFORE_CREATING_TRANSACTION);}catch(Exception err){}
44 p.buildXSQL(getDataBrokerDependency());