public class DataSourceConfig extends Object
| Constructor and Description |
|---|
DataSourceConfig() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDriver()
Gets the driver to be used for connecting the database.
|
long |
getIdleTime()
Gets the minimun time in seconds that a connection is unused in the
datasource to be considered iddle and released.
|
int |
getMaxConnections()
Gets the maximun numer of configurations allowed in the datasource.
|
int |
getMinConnections()
Gets the minumun amount of connections to keep in the datasource when
iddle connections are released.
|
String |
getName()
Gets the name of the DataSource object that will be found by the
JdbcService.getDataSource(java.lang.String) method. |
String |
getPassword()
Gets the password to be used to authenticate to the database server.
|
int |
getReconnectTime()
The time in seconds before the connection is tested to be discarted as
idle, and the framework tries to reconnect it again.
|
String |
getUrl()
Gets the jdbc url to connect to by this DataSource.
|
String |
getUser()
Gets the username to be used to authenticate to the database server.
|
void |
setDriver(String driver)
Sets the driver to be use for connecting the database.
|
void |
setIdleTime(long idleTime)
Sets the minimun time in seconds that a connection is unused in the
datasource to be considered iddle and released.
|
void |
setMaxConnections(int maxConnections)
Sets the maximun numer of configurations allowed in the datasource.
|
void |
setMinConnections(int minConnections)
Sets the minumun amount of connections to keep in the datasource when
iddle connections are released.
|
void |
setName(String name)
Sets the name of the DataSource object that will be found by the
JdbcService.getDataSource(java.lang.String) method. |
void |
setPassword(String password)
Sets the password to be used to authenticate to the database server.
|
void |
setReconnectTime(int reconnectTime)
The time in seconds before the connection is tested to be discarted as
idle, and the framework tries to reconnect it again.
|
void |
setUrl(String url)
Sets the jdbc url to connect to by this DataSource.
|
void |
setUser(String user)
Sets the username to be used to authenticate to the database server.
|
public String getName()
JdbcService.getDataSource(java.lang.String) method.public void setName(String name)
JdbcService.getDataSource(java.lang.String) method.name - The name of the DataSource.public String getDriver()
public void setDriver(String driver)
driver - The jdbc driver for this DataSource.public String getUrl()
public void setUrl(String url)
url - The jdbc connection string to be use by this DataSource.public String getUser()
public void setUser(String user)
user - The username for the database server authentication.public String getPassword()
public void setPassword(String password)
password - The password for the database server authentication.public int getMaxConnections()
public void setMaxConnections(int maxConnections)
maxConnections - The maximun numer of connections in the datasource.public long getIdleTime()
public void setIdleTime(long idleTime)
idleTime - The minimun amount of seconds a connection can be unused
before it is released.public int getMinConnections()
public void setMinConnections(int minConnections)
minConnections - The number of connections to keep in the datasource
even if they are iddle.public int getReconnectTime()
public void setReconnectTime(int reconnectTime)
reconnectTime - An integer representing the time in seconds.Copyright © 2015–2017 Bridje Framework. All rights reserved.