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)
15 public class XSQLModule extends org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.xsql.rev140626.AbstractXSQLModule {
16 private static final long SLEEP_TIME_BEFORE_CREATING_TRANSACTION = 10000;
17 public XSQLModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
18 super(identifier, dependencyResolver);
21 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) {
22 super(identifier, dependencyResolver, oldModule, oldInstance);
26 public void customValidation() {
27 // add custom validation form module attributes here.
31 public java.lang.AutoCloseable createInstance() {
32 XSQLAdapter xsqlAdapter = XSQLAdapter.getInstance();
33 getSchemaServiceDependency().registerSchemaContextListener(xsqlAdapter);
34 xsqlAdapter.setDataBroker(getAsyncDataBrokerDependency());
35 final XSQLProvider p = new XSQLProvider();
36 Runnable runthis = new Runnable() {
39 try{Thread.sleep(SLEEP_TIME_BEFORE_CREATING_TRANSACTION);}catch(Exception err){}
40 p.buildXSQL(getDataBrokerDependency());