public class ClickHouseDataSource extends Object implements DataSource
| Modifier and Type | Field and Description |
|---|---|
protected String |
database |
protected static String |
DEFAULT_DATABASE |
protected ClickHouseDriver |
driver |
protected String |
host |
protected int |
loginTimeout |
protected int |
port |
protected String |
url |
protected static Pattern |
urlRegexp |
| Constructor and Description |
|---|
ClickHouseDataSource(String url) |
ClickHouseDataSource(String url,
ClickHouseProperties properties) |
ClickHouseDataSource(String url,
Properties info) |
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
String |
getDatabase() |
String |
getHost() |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
int |
getPort() |
ClickHouseProperties |
getProperties() |
String |
getUrl() |
boolean |
isWrapperFor(Class<?> iface) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
<T> T |
unwrap(Class<T> iface) |
ClickHouseDataSource |
withConnectionsCleaning(int rate,
TimeUnit timeUnit)
Schedules connections cleaning at a rate.
|
protected static final Pattern urlRegexp
protected static final String DEFAULT_DATABASE
protected final ClickHouseDriver driver
protected final String url
protected String host
protected int port
protected String database
protected int loginTimeout
public ClickHouseDataSource(String url)
public ClickHouseDataSource(String url, Properties info)
public ClickHouseDataSource(String url, ClickHouseProperties properties)
public Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionpublic String getHost()
public int getPort()
public String getDatabase()
public String getUrl()
public ClickHouseProperties getProperties()
public PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic ClickHouseDataSource withConnectionsCleaning(int rate, TimeUnit timeUnit)
rate - timeUnit - Copyright © 2016. All rights reserved.