Package de.espirit.or
Class ConnectionConfiguration
java.lang.Object
de.espirit.or.ConnectionConfiguration
- All Implemented Interfaces:
Serializable
FirstSpirit database connection configuration parameter holder.
- Since:
- 4.0.17
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the number of max retries for the connection.Get the retry cycle for the connection (in milliseconds).Get the connection timeout.Get the database name.Get the driver.Get the generic properties as a mapgetHost()
Returns the host as string.getLayer()
Get the layer as string.Get the maximum string length.Get the parameter for the connection.Get the password string.Get the plain urlGet the interval in which the connection pool will be checked.Get the maximum number of pool connections.Get the minimum number of pool connections.Get the timeout for a pool connection.int
getPort()
Return the port number.Get the schema name.getUser()
Get the username.void
setConnectionRetry
(int retry) Set number of max retries for the connection.void
setConnectionRetryCycle
(long retryCycle) Set the retry cycle for the connection (milliseconds).void
setConnectionTimeout
(long timeout) Set the connection timeout in milliseconds.void
setDatabase
(String database) Set the database name.void
Set the driver.void
setGenericProperty
(String name, String value) Set eneric propertiesvoid
Set the host.void
Set the layer.void
setMaxStringLength
(int stringLength) Set the maximum string length.void
Set the parameter for the connection.void
setPassword
(String password) Set the password.void
setPlainUrl
(String plainUrl) Set the plain urlvoid
setPoolCheckInterval
(long checkInterval) Set the interval in which the connection pool will be checked.void
setPoolMax
(int max) Set the maximum number of pool connections.void
setPoolMin
(int min) Set the minimum number of pool connections.void
setPoolTimeout
(long timeout) Set the timeout for a pool connectionvoid
setPort
(int port) Set port number.void
Set the schema namevoid
Set the username.toString()
Get a connection configuration as string.
-
Constructor Details
-
ConnectionConfiguration
public ConnectionConfiguration()Creates an empty ConnectionConfiguration.- Since:
- 4.0.17
-
-
Method Details
-
getHost
Returns the host as string.- Returns:
- The host
- Since:
- 4.0.17
-
setHost
Set the host.- Parameters:
host
- The hostname- Since:
- 4.0.17
-
getLayer
Get the layer as string.- Returns:
- The layer
- Since:
- 4.0.17
-
setLayer
Set the layer.- Parameters:
layer
- The layer- Since:
- 4.0.17
-
getPassword
Get the password string.- Returns:
- The password
- Since:
- 4.0.17
-
setPassword
Set the password.- Parameters:
password
- The password to be set- Since:
- 4.0.17
-
getPort
public int getPort()Return the port number.- Returns:
- The port number
- Since:
- 4.0.17
-
setPort
public void setPort(int port) Set port number. Has to be a positive integer.- Parameters:
port
- The port number- Since:
- 4.0.17
-
getUser
Get the username.- Returns:
- The user
- Since:
- 4.0.17
-
setUser
Set the username.- Parameters:
user
- The username- Since:
- 4.0.17
-
getDriver
Get the driver.- Returns:
- The driver name
- Since:
- 4.0.17
-
setDriver
Set the driver.- Parameters:
driver
- The name of the driver- Since:
- 4.0.17
-
getDatabase
Get the database name.- Returns:
- The database name
- Since:
- 4.0.17
-
setDatabase
Set the database name.- Parameters:
database
- The database name- Since:
- 4.0.17
-
getSchema
Get the schema name.- Returns:
- The name of the schema
- Since:
- 4.0.17
-
setSchema
Set the schema name- Parameters:
schema
- The name of the schema- Since:
- 4.0.17
-
getParams
Get the parameter for the connection.- Returns:
- The parameter
- Since:
- 4.0.17
-
setParams
Set the parameter for the connection.- Parameters:
params
- The connection parameter- Since:
- 4.0.17
-
toString
Get a connection configuration as string. Passwords an username stay hidden. -
getConnectionRetry
Get the number of max retries for the connection.- Returns:
- Number of max retries
- Since:
- 4.0.19
-
setConnectionRetry
public void setConnectionRetry(int retry) Set number of max retries for the connection.- Parameters:
retry
- The number of max retries- Since:
- 4.0.19
-
getConnectionRetryCycle
Get the retry cycle for the connection (in milliseconds).- Returns:
- The connection retry cycle
- Since:
- 4.0.19
-
setConnectionRetryCycle
public void setConnectionRetryCycle(long retryCycle) Set the retry cycle for the connection (milliseconds).- Parameters:
retryCycle
- Cycle in milliseconds- Since:
- 4.0.19
-
getConnectionTimeout
Get the connection timeout.- Returns:
- The timeout in milliseconds
- Since:
- 4.0.19
-
setConnectionTimeout
public void setConnectionTimeout(long timeout) Set the connection timeout in milliseconds.- Parameters:
timeout
- The timeout in milliseconds- Since:
- 4.0.19
-
getMaxStringLength
Get the maximum string length.- Returns:
- The maximum string length
- Since:
- 4.0.19
-
setMaxStringLength
public void setMaxStringLength(int stringLength) Set the maximum string length.- Parameters:
stringLength
- The maximum string length- Since:
- 4.0.19
-
getPoolCheckInterval
Get the interval in which the connection pool will be checked.- Returns:
- The interval in milliseconds
- Since:
- 4.0.19
-
setPoolCheckInterval
public void setPoolCheckInterval(long checkInterval) Set the interval in which the connection pool will be checked.- Parameters:
checkInterval
- The interval in milliseconds- Since:
- 4.0.19
-
getPoolMax
Get the maximum number of pool connections.- Returns:
- The maximum number of pool connections
- Since:
- 4.0.19
-
setPoolMax
public void setPoolMax(int max) Set the maximum number of pool connections.- Parameters:
max
- The maximum number of pool connections- Since:
- 4.0.19
-
getPoolMin
Get the minimum number of pool connections.- Returns:
- The minimum number of pool connections
- Since:
- 4.0.19
-
setPoolMin
public void setPoolMin(int min) Set the minimum number of pool connections.- Parameters:
min
- The minimum number of pool connections- Since:
- 4.0.19
-
getPoolTimeout
Get the timeout for a pool connection.- Returns:
- The timeout in milliseconds
- Since:
- 4.0.19
-
setPoolTimeout
public void setPoolTimeout(long timeout) Set the timeout for a pool connection- Parameters:
timeout
- The timeout in milliseconds- Since:
- 4.0.19
-
getPlainUrl
Get the plain url- Returns:
- The plain url
- Since:
- 4.0.63
-
setPlainUrl
Set the plain url- Parameters:
plainUrl
- The url- Since:
- 4.0.63
-
getGenericProperties
Get the generic properties as a map- Returns:
- The properties
- Since:
- 4.0.132
-
setGenericProperty
Set eneric properties- Parameters:
name
- The name of the propertyvalue
- The value of the property- Since:
- 4.0.132
-