public class ConnectionFactoryImpl extends Object implements ConnectionFactory, Serializable
| Constructor and Description |
|---|
ConnectionFactoryImpl()
Creates new default
ConnectionFactoryImpl object |
ConnectionFactoryImpl(String URL,
String userName,
String password,
String driverName)
Creates new
ConnectionFactoryImpl object with user info |
ConnectionFactoryImpl(String URL,
String userName,
String password,
String driverName,
int minPool,
int maxPool)
Creates new
ConnectionFactoryImpl object with user and connection info |
| Modifier and Type | Method and Description |
|---|---|
void |
configured(boolean flag)
INTERNAL
Marks Connectionfactory as fully configured
|
boolean |
equals(Object obj)
Determines whether obj is a ConnectionFactoryImpl with the same configuration
|
Connection |
getConnection()
Returns java.sql.Connection
|
String |
getDriverName()
Returns JDBC driver name
|
int |
getLoginTimeout()
Returns the number of seconds to wait for a new connection to be
established to the data source
|
PrintWriter |
getLogWriter()
Returns the LogWriter to which messages should be sent
|
int |
getMaxPool()
Returns maximum number of connections in the connection pool
|
int |
getMinPool()
Returns minimum number of connections in the connection pool
|
int |
getMsInterval()
Returns the amount of time, in milliseconds, between the connection
manager's attempts to get a pooled connection.
|
int |
getMsWait()
Returns the number of milliseconds to wait for an available connection
from the connection pool before throwing an exception
|
int |
getTransactionIsolation()
Gets this ConnectionFactory's current transaction isolation level.
|
String |
getURL()
Returns connection URL
|
String |
getUserName()
Returns database user name
|
int |
hashCode()
Computes the hash code of this ConnectionFactoryImpl.
|
void |
setDriverName(String driverName)
Sets JDBC driver name
|
void |
setLoginTimeout(int loginTimeout)
Sets the number of seconds to wait for a new connection to be
established to the data source
|
void |
setLogWriter(PrintWriter logWriter)
Sets the LogWriter to which messages should be sent
|
void |
setMaxPool(int maxPool)
Sets maximum number of connections in the connection pool
|
void |
setMinPool(int minPool)
Sets minimum number of connections in the connection pool
|
void |
setMsInterval(int msInterval)
Sets the amount of time, in milliseconds, between the connection
manager's attempts to get a pooled connection.
|
void |
setMsWait(int msWait)
Sets the number of milliseconds to wait for an available connection
from the connection pool before throwing an exception
|
void |
setPassword(String password)
Sets database user password
|
void |
setTransactionIsolation(int level)
Sets transaction isolation level for all connections of this ConnectionFactory.
|
void |
setURL(String URL)
Sets JDBC connection URL
|
void |
setUserName(String userName)
Sets database user
|
public ConnectionFactoryImpl()
ConnectionFactoryImpl objectpublic ConnectionFactoryImpl(String URL, String userName, String password, String driverName)
ConnectionFactoryImpl object with user infoURL - connection URLuserName - database userpassword - database user passworddriverName - driver namepublic ConnectionFactoryImpl(String URL, String userName, String password, String driverName, int minPool, int maxPool)
ConnectionFactoryImpl object with user and connection infoURL - connection URLuserName - database userpassword - database user passworddriverName - driver nameminPool - minimum number of connectionsmaxPool - maximum number of connectionspublic void setDriverName(String driverName)
setDriverName in interface ConnectionFactorydriverName - JDBC driver namepublic String getDriverName()
getDriverName in interface ConnectionFactorypublic void setURL(String URL)
setURL in interface ConnectionFactoryURL - connection URLpublic String getURL()
getURL in interface ConnectionFactorypublic void setUserName(String userName)
setUserName in interface ConnectionFactoryuserName - database userpublic String getUserName()
getUserName in interface ConnectionFactorypublic void setPassword(String password)
setPassword in interface ConnectionFactorypassword - database user passwordpublic void setMinPool(int minPool)
setMinPool in interface ConnectionFactoryminPool - minimum number of connectionspublic int getMinPool()
getMinPool in interface ConnectionFactorypublic void setMaxPool(int maxPool)
setMaxPool in interface ConnectionFactorymaxPool - maximum number of connectionspublic int getMaxPool()
getMaxPool in interface ConnectionFactorypublic void setMsInterval(int msInterval)
setMsInterval in interface ConnectionFactorymsInterval - the interval between attempts to get a database
connection, in milliseconds.public int getMsInterval()
getMsInterval in interface ConnectionFactorypublic void setMsWait(int msWait)
setMsWait in interface ConnectionFactorymsWait - number in millisecondspublic int getMsWait()
getMsWait in interface ConnectionFactorypublic void setLogWriter(PrintWriter logWriter)
setLogWriter in interface ConnectionFactorylogWriter - logWriterpublic PrintWriter getLogWriter()
getLogWriter in interface ConnectionFactorypublic void setLoginTimeout(int loginTimeout)
setLoginTimeout in interface ConnectionFactoryloginTimeout - wait time in secondspublic int getLoginTimeout()
getLoginTimeout in interface ConnectionFactorypublic void setTransactionIsolation(int level)
setTransactionIsolation in interface ConnectionFactorylevel - - one of the java.sql.Connection.TRANSACTION_* isolation valuespublic int getTransactionIsolation()
getTransactionIsolation in interface ConnectionFactorypublic Connection getConnection()
getConnection in interface ConnectionFactorypublic boolean equals(Object obj)
public int hashCode()
public void configured(boolean flag)
flag - boolean flagCopyright © 2017. All rights reserved.