Package net.plsar
Class ExecutableDatasource
java.lang.Object
net.plsar.ExecutableDatasource
- All Implemented Interfaces:
java.sql.Wrapper,javax.sql.CommonDataSource,javax.sql.DataSource
public class ExecutableDatasource
extends java.lang.Object
implements javax.sql.DataSource
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExecutableDatasource.Builderstatic classExecutableDatasource.Executablestatic classExecutableDatasource.PapiException -
Constructor Summary
Constructors Constructor Description ExecutableDatasource(ExecutableDatasource.Builder config) -
Method Summary
Modifier and Type Method Description protected voidaddConnection()voidcreate()protected java.sql.ConnectioncreateConnection()java.sql.ConnectiongetConnection()java.sql.ConnectiongetConnection(java.lang.String username, java.lang.String password)intgetLoginTimeout()java.io.PrintWritergetLogWriter()java.util.logging.LoggergetParentLogger()booleanisWrapperFor(java.lang.Class<?> iface)voidsetLoginTimeout(int seconds)voidsetLogWriter(java.io.PrintWriter out)<T> Tunwrap(java.lang.Class<T> iface)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilderMethods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
Constructor Details
-
ExecutableDatasource
-
-
Method Details
-
create
public void create() -
addConnection
protected void addConnection() throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
getConnection
public java.sql.Connection getConnection()- Specified by:
getConnectionin interfacejavax.sql.DataSource
-
createConnection
protected java.sql.Connection createConnection() -
getConnection
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws ExecutableDatasource.PapiException- Specified by:
getConnectionin interfacejavax.sql.DataSource- Throws:
ExecutableDatasource.PapiException
-
getLogWriter
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException- Specified by:
getLogWriterin interfacejavax.sql.CommonDataSource- Specified by:
getLogWriterin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
setLogWriter
public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException- Specified by:
setLogWriterin interfacejavax.sql.CommonDataSource- Specified by:
setLogWriterin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
setLoginTimeout
public void setLoginTimeout(int seconds) throws java.sql.SQLException- Specified by:
setLoginTimeoutin interfacejavax.sql.CommonDataSource- Specified by:
setLoginTimeoutin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
getLoginTimeout
public int getLoginTimeout() throws java.sql.SQLException- Specified by:
getLoginTimeoutin interfacejavax.sql.CommonDataSource- Specified by:
getLoginTimeoutin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
getParentLogger
public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException- Specified by:
getParentLoggerin interfacejavax.sql.CommonDataSource- Throws:
java.sql.SQLFeatureNotSupportedException
-
unwrap
- Specified by:
unwrapin interfacejava.sql.Wrapper- Throws:
ExecutableDatasource.PapiException
-
isWrapperFor
- Specified by:
isWrapperForin interfacejava.sql.Wrapper- Throws:
ExecutableDatasource.PapiException
-