public abstract class AbstractDataSource extends Object implements CommonDataSource
Modifier | Constructor and Description |
---|---|
protected |
AbstractDataSource()
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected PGConnectionImpl |
createConnection(String u,
String p)
Create a connection
|
protected abstract Reference |
createReference()
Create a reference using the correct ObjectFactory instance
|
String |
getApplicationName()
Get the application name
|
String |
getClientEncoding()
Get the client encoding
|
String |
getDatabase()
Get the database
|
int |
getDefaultFetchSize()
Get the default fetch size
|
String |
getHost()
Get the host
|
boolean |
getHousekeeper()
Get the housekeeper
|
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
int |
getNetworkTimeout()
Get the network timeout in milliseconds
|
Logger |
getParentLogger() |
int |
getParsedSqlCacheSize()
Get the size of the parsed SQL cache.
|
String |
getPassword()
Get the password
|
int |
getPort()
Get the port
|
int |
getPreparedStatementCacheSize()
Get the size of the prepared statement cache
|
int |
getReceiveBufferSize()
Get the receive buffer size
|
Reference |
getReference() |
int |
getSendBufferSize()
Get the send buffer size
|
String |
getSslCertificateFile()
Get the SSL certificate file
|
String |
getSslKeyFile()
Get the SSL key file
|
String |
getSslMode()
Get the SSL mode
|
String |
getSslPassword()
Get the SSL password
|
String |
getSslRootCertificateFile()
Get the SSL root certificate file
|
boolean |
getStrictMode()
Get the strict mode
|
String |
getUser()
Get the user
|
void |
init(Reference reference)
Init
|
void |
setApplicationName(String v)
Set the application name
|
void |
setClientEncoding(String v)
Set the client encoding
|
void |
setDatabase(String v)
Set the database
|
void |
setDefaultFetchSize(int v)
Set the default fetch size
|
void |
setHost(String v)
Set the host
|
void |
setHousekeeper(boolean v)
Set the housekeeper
|
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
void |
setNetworkTimeout(int networkTimeout)
Set the network timeout in milliseconds
|
void |
setParsedSqlCacheSize(int cacheSize)
Set the size of the parsed SQL cache.
|
void |
setPassword(String v)
Set the password
|
void |
setPort(int v)
Set the port
|
void |
setPreparedStatementCacheSize(int preparedStatementCacheSize)
Set the size of the preapred statement cache
|
void |
setReceiveBufferSize(int v)
Set the receive buffer size
|
void |
setSendBufferSize(int v)
Set the send buffer size
|
void |
setSslCertificateFile(String v)
Set the SSL certificate file
|
void |
setSslKeyFile(String v)
Set the SSL key file
|
void |
setSslMode(String v)
Set the SSL mode
|
void |
setSslPassword(String v)
Set the SSL password
|
void |
setSslRootCertificateFile(String v)
Set the SSL root certificate file
|
void |
setStrictMode(boolean v)
Set the strict mode
|
void |
setUser(String v)
Set the user
|
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface CommonDataSource
SQLException
public void setLoginTimeout(int seconds) throws SQLException
setLoginTimeout
in interface CommonDataSource
SQLException
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface CommonDataSource
SQLException
public void setLogWriter(PrintWriter out) throws SQLException
setLogWriter
in interface CommonDataSource
SQLException
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface CommonDataSource
SQLFeatureNotSupportedException
protected abstract Reference createReference()
public Reference getReference() throws NamingException
NamingException
public void init(Reference reference)
reference
- The referencepublic String getHost()
public void setHost(String v)
v
- The valuepublic int getPort()
public void setPort(int v)
v
- The valuepublic String getDatabase()
public void setDatabase(String v)
v
- The valuepublic String getUser()
public void setUser(String v)
v
- The valuepublic String getPassword()
public void setPassword(String v)
v
- The valuepublic boolean getHousekeeper()
public void setHousekeeper(boolean v)
v
- The valuepublic int getParsedSqlCacheSize()
public void setParsedSqlCacheSize(int cacheSize)
cacheSize
- the number of SQL statements' parsed structures to cachepublic int getPreparedStatementCacheSize()
public void setPreparedStatementCacheSize(int preparedStatementCacheSize)
preparedStatementCacheSize
- the maximum number of PreparedStatements cached per connectionpublic String getApplicationName()
public void setApplicationName(String v)
v
- The valuepublic String getClientEncoding()
public void setClientEncoding(String v)
v
- The valuepublic void setNetworkTimeout(int networkTimeout)
networkTimeout
- The valuepublic int getNetworkTimeout()
public boolean getStrictMode()
public void setStrictMode(boolean v)
v
- The valuepublic int getDefaultFetchSize()
public void setDefaultFetchSize(int v)
v
- The valuepublic int getReceiveBufferSize()
public void setReceiveBufferSize(int v)
v
- The valuepublic int getSendBufferSize()
public void setSendBufferSize(int v)
v
- The valuepublic String getSslMode()
public void setSslMode(String v)
v
- The valuepublic String getSslPassword()
public void setSslPassword(String v)
v
- The valuepublic String getSslCertificateFile()
public void setSslCertificateFile(String v)
v
- The valuepublic String getSslKeyFile()
public void setSslKeyFile(String v)
v
- The valuepublic String getSslRootCertificateFile()
public void setSslRootCertificateFile(String v)
v
- The valueprotected PGConnectionImpl createConnection(String u, String p) throws SQLException
u
- The user namep
- The passwordSQLException
- Thrown in case of an errorCopyright © 2013–2017 impossibl.com. All rights reserved.