Refactor dblib
Changed openecomp references in dblib, filters and sli to onap. Note: these
must be committed together to get a clean compile.
Issue: CCSDK-11
Change-Id: Ibe0f64fb20f3ae9cdda2f7ea969ca722bbde0d15
Signed-off-by: Dan Timoney <dtimoney@att.com>
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSource.java
similarity index 97%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSource.java
index 58a0aeb..9dc262d 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSource.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib;
+package org.onap.ccsdk.sli.core.dblib;
import java.io.Closeable;
import java.io.IOException;
@@ -43,10 +43,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.tomcat.jdbc.pool.PoolExhaustedException;
-import org.openecomp.sdnc.sli.resource.dblib.config.BaseDBConfiguration;
-import org.openecomp.sdnc.sli.resource.dblib.pm.SQLExecutionMonitor;
-import org.openecomp.sdnc.sli.resource.dblib.pm.SQLExecutionMonitorObserver;
-import org.openecomp.sdnc.sli.resource.dblib.pm.SQLExecutionMonitor.TestObject;
+import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration;
+import org.onap.ccsdk.sli.core.dblib.pm.SQLExecutionMonitor;
+import org.onap.ccsdk.sli.core.dblib.pm.SQLExecutionMonitorObserver;
+import org.onap.ccsdk.sli.core.dblib.pm.SQLExecutionMonitor.TestObject;
+
import com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSourceFactory.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSourceFactory.java
similarity index 77%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSourceFactory.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSourceFactory.java
index 3e51ed9..07e3dfa 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSourceFactory.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/CachedDataSourceFactory.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,13 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib;
+package org.onap.ccsdk.sli.core.dblib;
-import org.openecomp.sdnc.sli.resource.dblib.config.BaseDBConfiguration;
-import org.openecomp.sdnc.sli.resource.dblib.config.JDBCConfiguration;
-import org.openecomp.sdnc.sli.resource.dblib.jdbc.JdbcDBCachedDataSource;
-import org.openecomp.sdnc.sli.resource.dblib.jdbc.MySQLCachedDataSource;
+import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration;
+import org.onap.ccsdk.sli.core.dblib.config.JDBCConfiguration;
+import org.onap.ccsdk.sli.core.dblib.jdbc.JdbcDBCachedDataSource;
+import org.onap.ccsdk.sli.core.dblib.jdbc.MySQLCachedDataSource;
/**
* @version $Revision: 1.1 $
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBConfigException.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBConfigException.java
similarity index 93%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBConfigException.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBConfigException.java
index b324e6a..e41e29b 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBConfigException.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBConfigException.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib;
+package org.onap.ccsdk.sli.core.dblib;
/**
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLIBResourceActivator.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLIBResourceActivator.java
similarity index 97%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLIBResourceActivator.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLIBResourceActivator.java
index 150a9a8..8ae9a26 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLIBResourceActivator.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLIBResourceActivator.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib;
+package org.onap.ccsdk.sli.core.dblib;
import java.io.File;
import java.net.URL;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLibConnection.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLibConnection.java
similarity index 98%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLibConnection.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLibConnection.java
index 5c1f510..8181b13 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLibConnection.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLibConnection.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib;
+package org.onap.ccsdk.sli.core.dblib;
import java.sql.Array;
import java.sql.Blob;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLibException.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLibException.java
similarity index 92%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLibException.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLibException.java
index cc80741..de241f4 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBLibException.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBLibException.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib;
+package org.onap.ccsdk.sli.core.dblib;
import java.sql.SQLException;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceManager.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBResourceManager.java
similarity index 93%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceManager.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBResourceManager.java
index 5cf2953..78b970b 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceManager.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBResourceManager.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib;
+package org.onap.ccsdk.sli.core.dblib;
import java.io.PrintWriter;
import java.sql.Connection;
@@ -47,12 +47,13 @@
import javax.sql.rowset.CachedRowSet;
import org.apache.tomcat.jdbc.pool.PoolExhaustedException;
-import org.openecomp.sdnc.sli.resource.dblib.config.DbConfigPool;
-import org.openecomp.sdnc.sli.resource.dblib.factory.AbstractDBResourceManagerFactory;
-import org.openecomp.sdnc.sli.resource.dblib.factory.AbstractResourceManagerFactory;
-import org.openecomp.sdnc.sli.resource.dblib.factory.DBConfigFactory;
-import org.openecomp.sdnc.sli.resource.dblib.pm.PollingWorker;
-import org.openecomp.sdnc.sli.resource.dblib.pm.SQLExecutionMonitor;
+import org.onap.ccsdk.sli.core.dblib.config.DbConfigPool;
+import org.onap.ccsdk.sli.core.dblib.factory.AbstractDBResourceManagerFactory;
+import org.onap.ccsdk.sli.core.dblib.factory.AbstractResourceManagerFactory;
+import org.onap.ccsdk.sli.core.dblib.factory.DBConfigFactory;
+import org.onap.ccsdk.sli.core.dblib.pm.PollingWorker;
+import org.onap.ccsdk.sli.core.dblib.pm.SQLExecutionMonitor;
+
import com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -108,23 +109,23 @@
this.configProps = props;
// get retry interval value
- retryInterval = getLongFromProperties(props, "org.openecomp.dblib.connection.retry", 10000L);
+ retryInterval = getLongFromProperties(props, "org.onap.dblib.connection.retry", 10000L);
// get recovery mode flag
- recoveryMode = getBooleanFromProperties(props, "org.openecomp.dblib.connection.recovery", true);
+ recoveryMode = getBooleanFromProperties(props, "org.onap.dblib.connection.recovery", true);
if(!recoveryMode)
{
recoveryMode = false;
LOGGER.info("Recovery Mode disabled");
}
// get time out value for thread cleanup
- terminationTimeOut = getLongFromProperties(props, "org.openecomp.dblib.termination.timeout", 300000L);
+ terminationTimeOut = getLongFromProperties(props, "org.onap.dblib.termination.timeout", 300000L);
// get properties for monitoring
- monitorDbResponse = getBooleanFromProperties(props, "org.openecomp.dblib.connection.monitor", false);
- monitoringInterval = getLongFromProperties(props, "org.openecomp.dblib.connection.monitor.interval", 1000L);
- monitoringInitialDelay = getLongFromProperties(props, "org.openecomp.dblib.connection.monitor.startdelay", 5000L);
- expectedCompletionTime = getLongFromProperties(props, "org.openecomp.dblib.connection.monitor.expectedcompletiontime", 5000L);
- unprocessedFailoverThreshold = getLongFromProperties(props, "org.openecomp.dblib.connection.monitor.unprocessedfailoverthreshold", 3L);
+ monitorDbResponse = getBooleanFromProperties(props, "org.onap.dblib.connection.monitor", false);
+ monitoringInterval = getLongFromProperties(props, "org.onap.dblib.connection.monitor.interval", 1000L);
+ monitoringInitialDelay = getLongFromProperties(props, "org.onap.dblib.connection.monitor.startdelay", 5000L);
+ expectedCompletionTime = getLongFromProperties(props, "org.onap.dblib.connection.monitor.expectedcompletiontime", 5000L);
+ unprocessedFailoverThreshold = getLongFromProperties(props, "org.onap.dblib.connection.monitor.unprocessedfailoverthreshold", 3L);
// initialize performance monitor
PollingWorker.createInistance(props);
@@ -285,7 +286,7 @@
}
/* (non-Javadoc)
- * @see org.openecomp.sdnc.sli.resource.dblib.DbLibService#getData(java.lang.String, java.util.ArrayList, java.lang.String)
+ * @see org.onap.ccsdk.sli.resource.dblib.DbLibService#getData(java.lang.String, java.util.ArrayList, java.lang.String)
*/
@Override
public CachedRowSet getData(String statement, ArrayList<String> arguments, String preferredDS) throws SQLException {
@@ -412,7 +413,7 @@
/* (non-Javadoc)
- * @see org.openecomp.sdnc.sli.resource.dblib.DbLibService#writeData(java.lang.String, java.util.ArrayList, java.lang.String)
+ * @see org.onap.ccsdk.sli.resource.dblib.DbLibService#writeData(java.lang.String, java.util.ArrayList, java.lang.String)
*/
@Override
public boolean writeData(String statement, ArrayList<String> arguments, String preferredDS) throws SQLException
@@ -696,7 +697,7 @@
}
/* (non-Javadoc)
- * @see org.openecomp.sdnc.sli.resource.dblib.DbLibService#isActive()
+ * @see org.onap.ccsdk.sli.resource.dblib.DbLibService#isActive()
*/
@Override
public boolean isActive() {
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceObserver.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBResourceObserver.java
similarity index 91%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceObserver.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBResourceObserver.java
index e06779f..2e1a6e9 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceObserver.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBResourceObserver.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib;
+package org.onap.ccsdk.sli.core.dblib;
import java.util.Observer;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DataAccessor.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DataAccessor.java
similarity index 92%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DataAccessor.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DataAccessor.java
index cd054a5..7921fa5 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DataAccessor.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DataAccessor.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib;
+package org.onap.ccsdk.sli.core.dblib;
import java.sql.SQLException;
import java.util.ArrayList;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DataSourceComparator.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DataSourceComparator.java
similarity index 92%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DataSourceComparator.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DataSourceComparator.java
index 37d6251..bc14fb8 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DataSourceComparator.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DataSourceComparator.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib;
+package org.onap.ccsdk.sli.core.dblib;
import java.util.Comparator;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DbLibService.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DbLibService.java
similarity index 93%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DbLibService.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DbLibService.java
index 25edd1f..de98466 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DbLibService.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DbLibService.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib;
+package org.onap.ccsdk.sli.core.dblib;
import java.sql.SQLException;
import java.util.ArrayList;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DblibConfigurationException.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DblibConfigurationException.java
similarity index 92%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DblibConfigurationException.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DblibConfigurationException.java
index 17700a5..be493aa 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/DblibConfigurationException.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DblibConfigurationException.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib;
+package org.onap.ccsdk.sli.core.dblib;
public class DblibConfigurationException extends Exception {
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/NoAvailableConnectionsException.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/NoAvailableConnectionsException.java
similarity index 92%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/NoAvailableConnectionsException.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/NoAvailableConnectionsException.java
index 16895b4..a39e5c5 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/NoAvailableConnectionsException.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/NoAvailableConnectionsException.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib;
+package org.onap.ccsdk.sli.core.dblib;
import java.sql.SQLException;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/TerminatingCachedDataSource.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/TerminatingCachedDataSource.java
similarity index 88%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/TerminatingCachedDataSource.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/TerminatingCachedDataSource.java
index 234bbed..127e6d3 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/TerminatingCachedDataSource.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/TerminatingCachedDataSource.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,13 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib;
+package org.onap.ccsdk.sli.core.dblib;
import java.sql.SQLFeatureNotSupportedException;
import java.util.logging.Logger;
-import org.openecomp.sdnc.sli.resource.dblib.config.BaseDBConfiguration;
-import org.openecomp.sdnc.sli.resource.dblib.pm.SQLExecutionMonitorObserver;
+import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration;
+import org.onap.ccsdk.sli.core.dblib.pm.SQLExecutionMonitorObserver;
public class TerminatingCachedDataSource extends CachedDataSource implements SQLExecutionMonitorObserver {
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/BaseDBConfiguration.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/BaseDBConfiguration.java
similarity index 67%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/BaseDBConfiguration.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/BaseDBConfiguration.java
index 976b1cf..4b738d4 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/BaseDBConfiguration.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/BaseDBConfiguration.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,25 +18,25 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib.config;
+package org.onap.ccsdk.sli.core.dblib.config;
import java.util.Properties;
public abstract class BaseDBConfiguration {
- public static final String DATABASE_TYPE = "org.openecomp.sdnc.sli.dbtype";
- public static final String DATABASE_URL = "org.openecomp.sdnc.sli.jdbc.url";
- public static final String DATABASE_NAME = "org.openecomp.sdnc.sli.jdbc.database";
- public static final String CONNECTION_NAME = "org.openecomp.sdnc.sli.jdbc.connection.name";
- public static final String DATABASE_USER = "org.openecomp.sdnc.sli.jdbc.user";
- public static final String DATABASE_PSSWD = "org.openecomp.sdnc.sli.jdbc.password";
- public static final String CONNECTION_TIMEOUT="org.openecomp.sdnc.sli.jdbc.connection.timeout";
- public static final String REQUEST_TIMEOUT = "org.openecomp.sdnc.sli.jdbc.request.timeout";
- public static final String MIN_LIMIT = "org.openecomp.sdnc.sli.jdbc.limit.min";
- public static final String MAX_LIMIT = "org.openecomp.sdnc.sli.jdbc.limit.max";
- public static final String INIT_LIMIT = "org.openecomp.sdnc.sli.jdbc.limit.init";
- public static final String DATABASE_HOSTS = "org.openecomp.sdnc.sli.jdbc.hosts";
+ public static final String DATABASE_TYPE = "org.onap.ccsdk.sli.dbtype";
+ public static final String DATABASE_URL = "org.onap.ccsdk.sli.jdbc.url";
+ public static final String DATABASE_NAME = "org.onap.ccsdk.sli.jdbc.database";
+ public static final String CONNECTION_NAME = "org.onap.ccsdk.sli.jdbc.connection.name";
+ public static final String DATABASE_USER = "org.onap.ccsdk.sli.jdbc.user";
+ public static final String DATABASE_PSSWD = "org.onap.ccsdk.sli.jdbc.password";
+ public static final String CONNECTION_TIMEOUT="org.onap.ccsdk.sli.jdbc.connection.timeout";
+ public static final String REQUEST_TIMEOUT = "org.onap.ccsdk.sli.jdbc.request.timeout";
+ public static final String MIN_LIMIT = "org.onap.ccsdk.sli.jdbc.limit.min";
+ public static final String MAX_LIMIT = "org.onap.ccsdk.sli.jdbc.limit.max";
+ public static final String INIT_LIMIT = "org.onap.ccsdk.sli.jdbc.limit.init";
+ public static final String DATABASE_HOSTS = "org.onap.ccsdk.sli.jdbc.hosts";
-
+
protected final Properties props;
public BaseDBConfiguration(Properties properties) {
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/DbConfigPool.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/DbConfigPool.java
similarity index 94%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/DbConfigPool.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/DbConfigPool.java
index 117f932..21fdab2 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/DbConfigPool.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/DbConfigPool.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib.config;
+package org.onap.ccsdk.sli.core.dblib.config;
import java.util.ArrayList;
import java.util.Properties;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/JDBCConfiguration.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/JDBCConfiguration.java
similarity index 91%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/JDBCConfiguration.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/JDBCConfiguration.java
index cb6ea3e..fea1035 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/config/JDBCConfiguration.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/config/JDBCConfiguration.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib.config;
+package org.onap.ccsdk.sli.core.dblib.config;
import java.util.Properties;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/AbstractDBResourceManagerFactory.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/AbstractDBResourceManagerFactory.java
similarity index 87%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/AbstractDBResourceManagerFactory.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/AbstractDBResourceManagerFactory.java
index f4291a7..e88734d 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/AbstractDBResourceManagerFactory.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/AbstractDBResourceManagerFactory.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,9 +18,9 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib.factory;
+package org.onap.ccsdk.sli.core.dblib.factory;
-import org.openecomp.sdnc.sli.resource.dblib.jdbc.JdbcDbResourceManagerFactory;
+import org.onap.ccsdk.sli.core.dblib.jdbc.JdbcDbResourceManagerFactory;
/**
* @version $Revision: 1.1 $
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/AbstractResourceManagerFactory.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/AbstractResourceManagerFactory.java
similarity index 84%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/AbstractResourceManagerFactory.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/AbstractResourceManagerFactory.java
index 0f58a3f..6fc7e7a 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/AbstractResourceManagerFactory.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/AbstractResourceManagerFactory.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,20 +18,20 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib.factory;
+package org.onap.ccsdk.sli.core.dblib.factory;
import java.sql.SQLException;
import java.util.Set;
import java.util.concurrent.Callable;
-import org.openecomp.sdnc.sli.resource.dblib.CachedDataSource;
-import org.openecomp.sdnc.sli.resource.dblib.CachedDataSourceFactory;
-import org.openecomp.sdnc.sli.resource.dblib.DBConfigException;
-import org.openecomp.sdnc.sli.resource.dblib.DBResourceManager;
-import org.openecomp.sdnc.sli.resource.dblib.config.BaseDBConfiguration;
-import org.openecomp.sdnc.sli.resource.dblib.config.DbConfigPool;
-import org.openecomp.sdnc.sli.resource.dblib.config.JDBCConfiguration;
+import org.onap.ccsdk.sli.core.dblib.CachedDataSource;
+import org.onap.ccsdk.sli.core.dblib.CachedDataSourceFactory;
+import org.onap.ccsdk.sli.core.dblib.DBConfigException;
+import org.onap.ccsdk.sli.core.dblib.DBResourceManager;
+import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration;
+import org.onap.ccsdk.sli.core.dblib.config.DbConfigPool;
+import org.onap.ccsdk.sli.core.dblib.config.JDBCConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/DBConfigFactory.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/DBConfigFactory.java
similarity index 90%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/DBConfigFactory.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/DBConfigFactory.java
index 8aadcae..3caa776 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/DBConfigFactory.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/DBConfigFactory.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,19 +18,18 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib.factory;
+package org.onap.ccsdk.sli.core.dblib.factory;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Properties;
+import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration;
+import org.onap.ccsdk.sli.core.dblib.config.DbConfigPool;
+import org.onap.ccsdk.sli.core.dblib.config.JDBCConfiguration;
import org.slf4j.LoggerFactory;
-import org.openecomp.sdnc.sli.resource.dblib.config.BaseDBConfiguration;
-import org.openecomp.sdnc.sli.resource.dblib.config.DbConfigPool;
-import org.openecomp.sdnc.sli.resource.dblib.config.JDBCConfiguration;
-
/**
* @version $Revision: 1.1 $
* Change Log
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/FactoryNotDefinedException.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/FactoryNotDefinedException.java
similarity index 92%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/FactoryNotDefinedException.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/FactoryNotDefinedException.java
index e38cd35..b6383a5 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/factory/FactoryNotDefinedException.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/factory/FactoryNotDefinedException.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib.factory;
+package org.onap.ccsdk.sli.core.dblib.factory;
/**
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDBCachedDataSource.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/JdbcDBCachedDataSource.java
similarity index 95%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDBCachedDataSource.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/JdbcDBCachedDataSource.java
index 90c76f6..c024d00 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDBCachedDataSource.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/JdbcDBCachedDataSource.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib.jdbc;
+package org.onap.ccsdk.sli.core.dblib.jdbc;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -27,13 +27,13 @@
import org.apache.tomcat.jdbc.pool.DataSource;
import org.apache.tomcat.jdbc.pool.PoolProperties;
+import org.onap.ccsdk.sli.core.dblib.CachedDataSource;
+import org.onap.ccsdk.sli.core.dblib.DBConfigException;
+import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration;
+import org.onap.ccsdk.sli.core.dblib.config.JDBCConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.openecomp.sdnc.sli.resource.dblib.CachedDataSource;
-import org.openecomp.sdnc.sli.resource.dblib.DBConfigException;
-import org.openecomp.sdnc.sli.resource.dblib.config.BaseDBConfiguration;
-import org.openecomp.sdnc.sli.resource.dblib.config.JDBCConfiguration;
import com.mysql.jdbc.Driver;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDbResourceManagerFactory.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/JdbcDbResourceManagerFactory.java
similarity index 90%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDbResourceManagerFactory.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/JdbcDbResourceManagerFactory.java
index 84399df..978de0e 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDbResourceManagerFactory.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/JdbcDbResourceManagerFactory.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib.jdbc;
+package org.onap.ccsdk.sli.core.dblib.jdbc;
import java.sql.SQLException;
@@ -32,13 +32,13 @@
import java.util.concurrent.Executors;
import java.util.concurrent.FutureTask;
-import org.openecomp.sdnc.sli.resource.dblib.CachedDataSource;
-import org.openecomp.sdnc.sli.resource.dblib.CachedDataSourceFactory;
-import org.openecomp.sdnc.sli.resource.dblib.DBResourceManager;
-import org.openecomp.sdnc.sli.resource.dblib.DataSourceComparator;
-import org.openecomp.sdnc.sli.resource.dblib.config.DbConfigPool;
-import org.openecomp.sdnc.sli.resource.dblib.config.JDBCConfiguration;
-import org.openecomp.sdnc.sli.resource.dblib.factory.AbstractResourceManagerFactory;
+import org.onap.ccsdk.sli.core.dblib.CachedDataSource;
+import org.onap.ccsdk.sli.core.dblib.CachedDataSourceFactory;
+import org.onap.ccsdk.sli.core.dblib.DBResourceManager;
+import org.onap.ccsdk.sli.core.dblib.DataSourceComparator;
+import org.onap.ccsdk.sli.core.dblib.config.DbConfigPool;
+import org.onap.ccsdk.sli.core.dblib.config.JDBCConfiguration;
+import org.onap.ccsdk.sli.core.dblib.factory.AbstractResourceManagerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/MySQLCachedDataSource.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/MySQLCachedDataSource.java
similarity index 94%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/MySQLCachedDataSource.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/MySQLCachedDataSource.java
index a5482d0..4072098 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/MySQLCachedDataSource.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/jdbc/MySQLCachedDataSource.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,15 +18,15 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib.jdbc;
+package org.onap.ccsdk.sli.core.dblib.jdbc;
import java.sql.SQLFeatureNotSupportedException;
import java.util.Properties;
-import org.openecomp.sdnc.sli.resource.dblib.CachedDataSource;
-import org.openecomp.sdnc.sli.resource.dblib.DBConfigException;
-import org.openecomp.sdnc.sli.resource.dblib.config.BaseDBConfiguration;
-import org.openecomp.sdnc.sli.resource.dblib.config.JDBCConfiguration;
+import org.onap.ccsdk.sli.core.dblib.CachedDataSource;
+import org.onap.ccsdk.sli.core.dblib.DBConfigException;
+import org.onap.ccsdk.sli.core.dblib.config.BaseDBConfiguration;
+import org.onap.ccsdk.sli.core.dblib.config.JDBCConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/PollingWorker.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/PollingWorker.java
similarity index 89%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/PollingWorker.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/PollingWorker.java
index de87fa7..b670a83 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/PollingWorker.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/PollingWorker.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib.pm;
+package org.onap.ccsdk.sli.core.dblib.pm;
import java.util.Iterator;
import java.util.Properties;
@@ -34,9 +34,9 @@
import java.util.concurrent.atomic.AtomicLong;
public class PollingWorker implements Runnable {
-
+
private Logger LOGGER = LoggerFactory.getLogger(PollingWorker.class);
-
+
private static PollingWorker self = null;
private LinkedBlockingQueue tasks = new LinkedBlockingQueue(100);
@@ -53,25 +53,25 @@
temp.register(new TestSample(starttime));
}
}
-
+
public static void createInistance(Properties props){
self = new PollingWorker(props);
}
private PollingWorker(Properties ctxprops){
- if(ctxprops==null || ctxprops.getProperty("org.openecomp.sdnc.dblib.pm") == null){
+ if(ctxprops==null || ctxprops.getProperty("org.onap.ccsdk.dblib.pm") == null){
enabled = false;
} else {
- if("true".equalsIgnoreCase((String)ctxprops.getProperty("org.openecomp.sdnc.dblib.pm"))){
+ if("true".equalsIgnoreCase((String)ctxprops.getProperty("org.onap.ccsdk.dblib.pm"))){
enabled = true;
} else {
enabled = false;
}
}
- interval = Long.parseLong(( ctxprops == null || ctxprops.getProperty("org.openecomp.sdnc.dblib.pm.interval") == null) ? "60" : (String)ctxprops.getProperty("org.openecomp.sdnc.dblib.pm.interval"));
+ interval = Long.parseLong(( ctxprops == null || ctxprops.getProperty("org.onap.ccsdk.dblib.pm.interval") == null) ? "60" : (String)ctxprops.getProperty("org.onap.ccsdk.dblib.pm.interval"));
// '0' bucket is to count exceptions
- String sampling[] = ((ctxprops == null || ctxprops.getProperty("org.openecomp.sdnc.dblib.pm.sampling")==null) ? "0,2,5,10,20,50,100" : (String)ctxprops.getProperty("org.openecomp.sdnc.dblib.pm.sampling")).split(",");
+ String sampling[] = ((ctxprops == null || ctxprops.getProperty("org.onap.ccsdk.dblib.pm.sampling")==null) ? "0,2,5,10,20,50,100" : (String)ctxprops.getProperty("org.onap.ccsdk.dblib.pm.sampling")).split(",");
if(enabled){
bucketUnit = new int[sampling.length];
@@ -89,7 +89,7 @@
timer.schedule(new MyTimerTask(), interval*1000L, interval*1000L);
}
}
-
+
private void register(TestSample object){
try {
tasks.add(object);
@@ -101,7 +101,7 @@
private void deRegister(TestSample object){
tasks.remove(object);
}
-
+
public void run() {
for(;;){
Set data = new TreeSet();
@@ -147,14 +147,14 @@
}
LOGGER.info(sb.toString());
}
-
+
class MyTimerTask extends TimerTask{
public void run() {
-
+
clearReqister();
}
-
+
}
private void consume(TestSample probe) {
@@ -163,9 +163,9 @@
counters[getBucket(probe.getDuration())].incrementAndGet();
}
}
-
+
/*
- * This method is used to find the offset of the bucket in
+ * This method is used to find the offset of the bucket in
* counters. 'counters' array is 1 size longer than bucketUnit,
* hence by default it returns 'bucketUnit.length'
*/
@@ -177,7 +177,7 @@
}
return bucketUnit.length;
}
-
+
private static boolean isEnabled() {
return enabled;
}
@@ -188,17 +188,17 @@
static class TestSample implements Comparable{
private long starttime;
private long endtime;
-
+
public TestSample(long starttime) {
this.endtime = System.currentTimeMillis();
this.starttime = starttime;
}
-
+
public long getDuration(){
return endtime - starttime;
}
- public int compareTo(Object o) {
+ public int compareTo(Object o) {
if(o instanceof TestSample){
TestSample x = (TestSample)o;
if(starttime < x.starttime)
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/SQLExecutionMonitor.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/SQLExecutionMonitor.java
similarity index 97%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/SQLExecutionMonitor.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/SQLExecutionMonitor.java
index c58c9db..bcd4360 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/SQLExecutionMonitor.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/SQLExecutionMonitor.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib.pm;
+package org.onap.ccsdk.sli.core.dblib.pm;
import java.io.Serializable;
import java.util.Arrays;
@@ -31,7 +31,7 @@
import java.util.TreeSet;
import java.util.concurrent.atomic.AtomicLong;
-import org.openecomp.sdnc.sli.resource.dblib.DBResourceObserver;
+import org.onap.ccsdk.sli.core.dblib.DBResourceObserver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/SQLExecutionMonitorObserver.java b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/SQLExecutionMonitorObserver.java
similarity index 92%
rename from dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/SQLExecutionMonitorObserver.java
rename to dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/SQLExecutionMonitorObserver.java
index 1f32975..c17696a 100644
--- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/pm/SQLExecutionMonitorObserver.java
+++ b/dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/pm/SQLExecutionMonitorObserver.java
@@ -1,8 +1,8 @@
/*-
* ============LICENSE_START=======================================================
- * openecomp
+ * onap
* ================================================================================
- * Copyright (C) 2016 - 2017 AT&T
+ * Copyright (C) 2016 - 2017 ONAP
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdnc.sli.resource.dblib.pm;
+package org.onap.ccsdk.sli.core.dblib.pm;
public interface SQLExecutionMonitorObserver {
public String getDbConnectionName();
diff --git a/dblib/provider/src/main/resources/dblib.properties b/dblib/provider/src/main/resources/dblib.properties
index ac295c7..3e62308 100755
--- a/dblib/provider/src/main/resources/dblib.properties
+++ b/dblib/provider/src/main/resources/dblib.properties
@@ -1,13 +1,13 @@
-org.openecomp.sdnc.sli.dbtype=jdbc
-org.openecomp.sdnc.sli.jdbc.hosts=sdnctldb01,sdnctldb02
-org.openecomp.sdnc.sli.jdbc.url=jdbc:mysql://DBHOST:3306/sdnctl
-org.openecomp.sdnc.sli.jdbc.database=sdnctl
-org.openecomp.sdnc.sli.jdbc.user={user for sdnctl}
-org.openecomp.sdnc.sli.jdbc.password={password for sdnctl}
-org.openecomp.sdnc.sli.jdbc.connection.name=sdnctldb01
+org.onap.ccsdk.sli.dbtype=jdbc
+org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01,sdnctldb02
+org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://DBHOST:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.database=sdnctl
+org.onap.ccsdk.sli.jdbc.user={user for sdnctl}
+org.onap.ccsdk.sli.jdbc.password={password for sdnctl}
+org.onap.ccsdk.sli.jdbc.connection.name=sdnctldb01
-org.openecomp.sdnc.sli.jdbc.connection.timeout=50
-org.openecomp.sdnc.sli.jdbc.request.timeout=100
-org.openecomp.sdnc.sli.jdbc.limit.init=10
-org.openecomp.sdnc.sli.jdbc.limit.min=10
-org.openecomp.sdnc.sli.jdbc.limit.max=20
+org.onap.ccsdk.sli.jdbc.connection.timeout=50
+org.onap.ccsdk.sli.jdbc.request.timeout=100
+org.onap.ccsdk.sli.jdbc.limit.init=10
+org.onap.ccsdk.sli.jdbc.limit.min=10
+org.onap.ccsdk.sli.jdbc.limit.max=20