2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2016 - 2017 ONAP
6 * ================================================================================
7 * Modifications Copyright (C) 2018 IBM.
8 * ================================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ============LICENSE_END=========================================================
23 package org.onap.ccsdk.sli.core.dblib.config;
25 import java.util.ArrayList;
26 import java.util.Properties;
27 import org.slf4j.Logger;
28 import org.slf4j.LoggerFactory;
31 * @version $Revision: 1.15 $
33 * Author Date Comments
34 * ============== ======== ====================================================
37 public class DbConfigPool {
38 private static final Logger LOGGER = LoggerFactory.getLogger(DbConfigPool.class);
39 private final String type;
40 private static final int timeOut=0;
41 private ArrayList<BaseDBConfiguration> configurations = new ArrayList<>();
43 public DbConfigPool(Properties properties) {
44 LOGGER.debug("Initializing DbConfigType");
45 type = properties.getProperty(BaseDBConfiguration.DATABASE_TYPE, "JDBC").toUpperCase();
48 public int getTimeout() {
52 public String getType() {
56 public JDBCConfiguration[] getJDBCbSourceArray() {
57 return configurations.toArray(new JDBCConfiguration[configurations.size()]);
60 public void addConfiguration(BaseDBConfiguration config) {
61 configurations.add(config);