179 lines
3.8 KiB
Java
179 lines
3.8 KiB
Java
/*
|
|
* Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
* in compliance with the License. You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
* or implied. See the License for the specific language governing permissions and limitations under
|
|
* the License.
|
|
*/
|
|
|
|
package monasca.thresh.infrastructure.thresholding;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.Properties;
|
|
|
|
/**
|
|
* This class replaces io.dropwizard.db.DataSourceFactory which currently can't be used with Storm
|
|
* because it is not marked Serializable. This class could be deleted and replaced by that class
|
|
* when and if io.dropwizard.db.DataSourceFactory is marked Serializable.
|
|
*/
|
|
public class DataSourceFactory implements Serializable {
|
|
|
|
private static final long serialVersionUID = -1903552028062110222L;
|
|
|
|
private String user;
|
|
|
|
private String password;
|
|
|
|
private String url;
|
|
|
|
private String driverClass;
|
|
|
|
private Properties properties;
|
|
|
|
private String maxWaitForConnection;
|
|
|
|
private String validationQuery;
|
|
|
|
private String minSize;
|
|
|
|
private String maxSize;
|
|
|
|
private boolean hibernateSupport;
|
|
|
|
private String providerClass;
|
|
|
|
private String databaseName;
|
|
|
|
private String serverName;
|
|
|
|
private String portNumber;
|
|
|
|
private String autoConfig;
|
|
|
|
public String getUser() {
|
|
return user;
|
|
}
|
|
|
|
public void setUser(String user) {
|
|
this.user = user;
|
|
}
|
|
|
|
public String getPassword() {
|
|
return password;
|
|
}
|
|
|
|
public void setPassword(String password) {
|
|
this.password = password;
|
|
}
|
|
|
|
public String getUrl() {
|
|
return url;
|
|
}
|
|
|
|
public void setUrl(String url) {
|
|
this.url = url;
|
|
}
|
|
|
|
public String getDriverClass() {
|
|
return driverClass;
|
|
}
|
|
|
|
public void setDriverClass(String driverClass) {
|
|
this.driverClass = driverClass;
|
|
}
|
|
|
|
public Properties getProperties() {
|
|
return properties;
|
|
}
|
|
|
|
public void setProperties(Properties properties) {
|
|
this.properties = properties;
|
|
}
|
|
|
|
public String getMaxWaitForConnection() {
|
|
return maxWaitForConnection;
|
|
}
|
|
|
|
public void setMaxWaitForConnection(String maxWaitForConnection) {
|
|
this.maxWaitForConnection = maxWaitForConnection;
|
|
}
|
|
|
|
public String getValidationQuery() {
|
|
return validationQuery;
|
|
}
|
|
|
|
public void setValidationQuery(String validationQuery) {
|
|
this.validationQuery = validationQuery;
|
|
}
|
|
|
|
public String getMinSize() {
|
|
return minSize;
|
|
}
|
|
|
|
public void setMinSize(String minSize) {
|
|
this.minSize = minSize;
|
|
}
|
|
|
|
public String getMaxSize() {
|
|
return maxSize;
|
|
}
|
|
|
|
public void setMaxSize(String maxSize) {
|
|
this.maxSize = maxSize;
|
|
}
|
|
|
|
public boolean isHibernateSupport() {
|
|
return hibernateSupport;
|
|
}
|
|
|
|
public void setHibernateSupport(boolean hibernateSupport) {
|
|
this.hibernateSupport = hibernateSupport;
|
|
}
|
|
|
|
public String getProviderClass() {
|
|
return providerClass;
|
|
}
|
|
|
|
public void setProviderClass(String providerClass) {
|
|
this.providerClass = providerClass;
|
|
}
|
|
|
|
public String getDatabaseName() {
|
|
return databaseName;
|
|
}
|
|
|
|
public void setDatabaseName(String databaseName) {
|
|
this.databaseName = databaseName;
|
|
}
|
|
|
|
public String getServerName() {
|
|
return serverName;
|
|
}
|
|
|
|
public void setServerName(String serverName) {
|
|
this.serverName = serverName;
|
|
}
|
|
|
|
public String getPortNumber() {
|
|
return portNumber;
|
|
}
|
|
|
|
public void setPortNumber(String portNumber) {
|
|
this.portNumber = portNumber;
|
|
}
|
|
|
|
public String getAutoConfig() {
|
|
return autoConfig;
|
|
}
|
|
|
|
public void setAutoConfig(String autoConfig) {
|
|
this.autoConfig = autoConfig;
|
|
}
|
|
}
|