|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jtools.jpool.system.PoolConfig
PoolConfig Class This class represents the values used to set up the connections to one database. The default values are used in case the these were not specified in the xml configuration file. These class are created when the parsing of the xml configuration class takes places. On creation of the database pools each of them will have their own configuration object. Based upon the values of this object the behaviour of the pool can be different for one of them.
$Id: PoolConfig.java,v 1.1 2003/10/15 15:37:31 stfndln Exp $
Field Summary | |
static long |
DEFAULT_EXPIRE
The maximum time a connection may not be used. |
static int |
DEFAULT_MAXCONN
default maximum number of connections to the database. |
static int |
DEFAULT_MINCONN
default initial number of connection to the database |
static long |
DEFAULT_TIMEOUT
The maximum time for which you will wait to retrieve a connection from the pool |
Constructor Summary | |
PoolConfig()
Default Constructor from which the default values are set. |
Method Summary | |
java.lang.String |
getDatabaseURL()
Retrieves the database url which defines the database to connect to. |
java.lang.String |
getDriver()
Retrieves the jdbc driver to use in order to establish a connection with the database. |
long |
getExpire()
Retrieves the maximum time a pooled connection may be inactive |
int |
getMaxConnection()
Retrieves the maximum number of connection established for the database pool |
int |
getMinConnection()
Retrieves the initial number of connections established for database pool |
java.lang.String |
getName()
Retrieves the name of the database pool as specified in the xml configuration file. |
char[] |
getPassword()
Retrieves the password to authenticate to the database |
long |
getTimeout()
Retrieves the maximum time to wait for a pooled connection. |
java.lang.String |
getUsername()
Retrieves the usename to authenticate to the database |
void |
setDatabaseURL(java.lang.String _databaseurl)
Sets the database url which defines to which database you want to connect |
void |
setDriver(java.lang.String _driver)
Sets the jdbc driver in order to establish connections with the database |
void |
setExpire(long _expire)
Sets the maximum time a pooled connections may be inactive |
void |
setMaxConnection(int _maxconn)
Sets the maximum number of connections that may be requested simultaniously |
void |
setMinConnection(int _minconn)
Sets the initial number of connections to be created |
void |
setName(java.lang.String _name)
Sets the database name as specified in the xml configuration. |
void |
setPassword(char[] _password)
Sets the password to authenticate to the database |
void |
setTimeout(long _timeout)
Sets the maximum time to wait to retrieve a pooled connection |
void |
setUsername(java.lang.String _username)
Sets the username to authenticate to the database |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_MINCONN
public static final int DEFAULT_MAXCONN
public static final long DEFAULT_TIMEOUT
public static final long DEFAULT_EXPIRE
Constructor Detail |
public PoolConfig()
Method Detail |
public java.lang.String getName()
public java.lang.String getDriver()
public java.lang.String getDatabaseURL()
public java.lang.String getUsername()
public char[] getPassword()
public int getMinConnection()
public int getMaxConnection()
public long getTimeout()
public long getExpire()
public void setName(java.lang.String _name)
_name
- The name of the databasepublic void setDriver(java.lang.String _driver)
_driver
- The jdbc driverpublic void setDatabaseURL(java.lang.String _databaseurl)
_databaseurl
- The database urlpublic void setUsername(java.lang.String _username)
_username
- The usernamepublic void setPassword(char[] _password)
_password
- The passwordpublic void setMinConnection(int _minconn)
_minconn
- The initial number of connectionspublic void setMaxConnection(int _maxconn)
_maxconn
- The maximum number of connectionspublic void setTimeout(long _timeout)
_timeout
- The maximum time to waitpublic void setExpire(long _expire)
_expire
- The maximum time for a inactive connection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |