Package com.databricks.client.jdbc
Class DataSource
- java.lang.Object
-
- com.databricks.client.jdbc.DataSource
-
- All Implemented Interfaces:
Wrapper,CommonDataSource,ConnectionPoolDataSource,DataSource
public class DataSource extends Object implements DataSource, ConnectionPoolDataSource
-
-
Constructor Summary
Constructors Constructor Description DataSource()DataSource(Driver driver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectiongetConnection()ConnectiongetConnection(String username, String password)StringgetHost()StringgetHttpPath()intgetLoginTimeout()PrintWritergetLogWriter()LoggergetParentLogger()StringgetPassword()PooledConnectiongetPooledConnection()PooledConnectiongetPooledConnection(String user, String password)intgetPort()PropertiesgetProperties()StringgetUrl()StringgetUsername()booleanisWrapperFor(Class<?> iface)voidsetHost(String host)voidsetHttpPath(String httpPath)voidsetLoginTimeout(int seconds)voidsetLogWriter(PrintWriter out)voidsetPassword(String password)voidsetPort(int port)voidsetProperties(Properties properties)voidsetUsername(String user)<T> Tunwrap(Class<T> iface)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
-
Methods inherited from interface javax.sql.ConnectionPoolDataSource
createPooledConnectionBuilder
-
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
-
-
-
Constructor Detail
-
DataSource
public DataSource()
-
DataSource
public DataSource(Driver driver)
-
-
Method Detail
-
getConnection
public Connection getConnection() throws DatabricksSQLException
- Specified by:
getConnectionin interfaceDataSource- Throws:
DatabricksSQLException
-
getConnection
public Connection getConnection(String username, String password) throws DatabricksSQLException
- Specified by:
getConnectionin interfaceDataSource- Throws:
DatabricksSQLException
-
getPooledConnection
public PooledConnection getPooledConnection() throws DatabricksSQLException
- Specified by:
getPooledConnectionin interfaceConnectionPoolDataSource- Throws:
DatabricksSQLException
-
getPooledConnection
public PooledConnection getPooledConnection(String user, String password) throws DatabricksSQLException
- Specified by:
getPooledConnectionin interfaceConnectionPoolDataSource- Throws:
DatabricksSQLException
-
getLogWriter
public PrintWriter getLogWriter() throws SQLException
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceConnectionPoolDataSource- Specified by:
getLogWriterin interfaceDataSource- Throws:
SQLException
-
setLogWriter
public void setLogWriter(PrintWriter out) throws SQLException
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceConnectionPoolDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
public void setLoginTimeout(int seconds)
- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceConnectionPoolDataSource- Specified by:
setLoginTimeoutin interfaceDataSource
-
getLoginTimeout
public int getLoginTimeout()
- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceConnectionPoolDataSource- Specified by:
getLoginTimeoutin interfaceDataSource
-
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLoggerin interfaceCommonDataSource- Throws:
SQLFeatureNotSupportedException
-
unwrap
public <T> T unwrap(Class<T> iface) throws SQLException
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface) throws SQLException
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
getUrl
public String getUrl()
-
getUsername
public String getUsername()
-
setUsername
public void setUsername(String user)
-
getPassword
public String getPassword()
-
setPassword
public void setPassword(String password)
-
getHost
public String getHost()
-
setHost
public void setHost(String host)
-
getPort
public int getPort()
-
setPort
public void setPort(int port)
-
getHttpPath
public String getHttpPath()
-
setHttpPath
public void setHttpPath(String httpPath)
-
getProperties
public Properties getProperties()
-
setProperties
public void setProperties(Properties properties)
-
-