|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wildfly.extras.creaper.commands.datasources.AddDataSource.Builder<THIS>
public static class AddDataSource.Builder<THIS extends AddDataSource.Builder>
Builder for configuration attributes of a datasource. The THIS type parameter is only meant
to be used by subclasses. If you're not inheriting from this class, don't use it.
| Constructor Summary | |
|---|---|
AddDataSource.Builder(String name)
|
|
| Method Summary | |
|---|---|
THIS |
addConnectionProperties(Map<String,String> connectionProperties)
Adding connection properties in bulk. |
THIS |
addConnectionProperty(String name,
boolean value)
See addConnectionProperty(String, String) |
THIS |
addConnectionProperty(String name,
String value)
Adding connection property. |
THIS |
addExceptionSorterProperty(String name,
boolean value)
Property for exceptionSorterClass |
THIS |
addExceptionSorterProperty(String name,
String value)
Property for exceptionSorterClass |
THIS |
addReauthPluginProperty(String name,
boolean value)
Property for reauthPluginClass |
THIS |
addReauthPluginProperty(String name,
String value)
Property for reauthPluginClass |
THIS |
addStaleConnectionCheckerProperty(String name,
boolean value)
Property for staleConnectionCheckerClass |
THIS |
addStaleConnectionCheckerProperty(String name,
String value)
Property for staleConnectionCheckerClass |
THIS |
addValidConnectionCheckerProperty(String name,
boolean value)
Property for validConnectionCheckerClass |
THIS |
addValidConnectionCheckerProperty(String name,
String value)
Property for validConnectionCheckerClass |
THIS |
allocationRetry(Integer allocationRetry)
The allocation retry element indicates the number of times that allocating a connection should be tried before throwing an exception. |
THIS |
allocationRetryWaitMillis(Integer allocationRetryWaitMillis)
The allocation retry wait millis element indicates the time in milliseconds to wait between retrying to allocate a connection |
THIS |
allowMultipleUsers(Boolean allowMultipleUsers)
Specifies if multiple users will access the datasource through the getConnection(user, password) method and hence if the internal pool type should account for that |
THIS |
backgroundValidation(Boolean backgroundValidation)
Connections should be validated on a background thread (versus being validated prior to use). |
THIS |
backgroundValidationMillis(Integer backgroundValidationMillis)
Amount of time that background validation will run. |
THIS |
blockingTimeoutWaitMillis(Integer blockingTimeoutWaitMillis)
The blocking-timeout-millis element indicates the maximum time in milliseconds to block while waiting for a connection before throwing an exception. |
AddDataSource |
build()
|
THIS |
connectable(Boolean connectable)
Setting this to true will let to use CMR. |
THIS |
connectionUrl(String connectionUrl)
Defines the JDBC driver connection URL. |
THIS |
datasourceClass(String datasourceClass)
What datasource class will be used for connection. |
THIS |
driverClass(String driverClass)
What driver class will be used for connection. |
THIS |
driverName(String driverName)
Defines the JDBC driver the datasource should use. |
THIS |
enableAfterCreate()
Defines whether the connector should be started on startup. |
THIS |
exceptionSorterClass(String exceptionSorterClass)
org.jboss.jca.adapters.jdbc.ExceptionSorter |
THIS |
flushStrategy(PoolFlushStrategy flushStrategy)
How poool should be flushed. |
protected void |
check()
|
THIS |
checkValidConnectionSql(String checkValidConnectionSql)
SQL statement to check validity of a pool connection. |
THIS |
idleTimeoutMinutes(Integer idleTimeoutMinutes)
The idle-timeout-minutes elements indicates the maximum time in minutes a connection may be idle before being closed. |
THIS |
jndiName(String jndiName)
Specifies the JNDI name for the datasource. |
THIS |
jta(Boolean jta)
Enable JTA integration. |
THIS |
managedConnectionPool(String managedConnectionPool)
Defines the ManagedConnectionPool implementation, f.ex. org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool |
THIS |
maxPoolSize(int maxPoolSize)
Specifies the maximum number of connections for a pool. |
THIS |
minPoolSize(int minPoolSize)
Specifies the minimum number of connections for a pool. |
THIS |
newConnectionSql(String newConnectionSql)
SQL statement to execute whenever a connection is added to the JCA connection pool. |
THIS |
prefill(Boolean prefill)
Whether to attempt to prefill the connection pool. |
THIS |
preparedStatementsCacheSize(Integer preparedStatementsCacheSize)
The number of prepared statements per connection in an LRU cache |
THIS |
queryTimeout(Integer queryTimeout)
Any configured query timeout in seconds. |
THIS |
reauthPluginClass(String reauthPluginClass)
Setting reauth plugin class name. |
THIS |
replaceExisting()
Specify whether to replace the existing datasource based on its name (pool-name). |
THIS |
securityDomain(String securityDomain)
Security domain name to be used for authentication to datasource. |
THIS |
setTxQueryTimeout(Boolean setTxQueryTimeout)
Whether to set the query timeout based on the time remaining until transaction timeout, any configured query timeout will be used if there is no transaction. |
THIS |
sharePreparedStatements(Boolean sharePreparedStatements)
Whether to share prepare statements, i.e. whether asking for same statement twice without closing uses the same underlying prepared statement. |
THIS |
spy(Boolean spy)
An org.jboss.jca.adapters.jdbc.ExceptionSorter. |
THIS |
staleConnectionCheckerClass(String staleConnectionCheckerClass)
An org.jboss.jca.adapters.jdbc.StaleConnectionChecker. |
THIS |
statisticsEnabled(Boolean statisticsEnabled)
Sets whether runtime statistics are enabled or not. |
THIS |
trackPreparedStatements(TrackStatementType trackStatements)
Whether to check for unclosed statements when a connection is returned to the pool and result sets are closed when a statement is closed/return to the prepared statement cache. |
THIS |
transactionIsolation(TransactionIsolation transactionIsolation)
Defines isolation level for connections created under this datasource. |
THIS |
urlDelimiter(String urlDelimiter)
Specifies the delimeter for URLs in connection-url for HA datasources |
THIS |
urlSelectorStrategyClass(String urlSelectorStrategyClass)
A class that implements org.jboss.jca.adapters.jdbc.URLSelectorStrategy |
THIS |
useCcm(Boolean useCcm)
Enable the use of a cached connection manager. |
THIS |
useFastFailAllocation(Boolean useFastFailAllocation)
Whether fail a connection allocation on the first connection if it is invalid (true) or keep trying until the pool is exhausted of all potential connections (false). |
THIS |
useJavaContext(Boolean useJavaContext)
Setting this to false will bind the datasource into global JNDI. |
THIS |
usernameAndPassword(String username,
String password)
Specify the user name and password used when creating a new connection. |
THIS |
useStrictMinPoolSize(Boolean useStrictMinPoolSize)
If the minPoolSize should be considered a strictly. |
THIS |
useTryLock(Integer useTryLock)
Any configured timeout for internal locks on the resource adapter objects in seconds. |
THIS |
validateOnMatch(Boolean validateOnMatch)
Validation will be done on connection factory attempt to match a managed connection for a given set. |
THIS |
validConnectionCheckerClass(String validConnectionCheckerClass)
An org.jboss.jca.adapters.jdbc.ValidConnectionChecker. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AddDataSource.Builder(String name)
| Method Detail |
|---|
public final THIS connectionUrl(String connectionUrl)
public final THIS driverName(String driverName)
public final THIS jndiName(String jndiName)
public final THIS driverClass(String driverClass)
public final THIS datasourceClass(String datasourceClass)
Datasource class has to be defined as fully qualified datasource class name of jdbc driver.
By default driver class is used for establishing connection but you can enforce the datasource class would be use. If you use datasource you will probably needs to define connection properties as well.
public final THIS addConnectionProperty(String name,
String value)
When datasource class is defined, then JCA injects these properties by calling setters based on property
name (i.e., if connection property name is user, then JCA calls Datasource.setUser(value)).
When driver class is defined, these properties are passed
to Driver.
public final THIS addConnectionProperty(String name,
boolean value)
addConnectionProperty(String, String)
public final THIS addConnectionProperties(Map<String,String> connectionProperties)
addConnectionProperty(String, String).
public final THIS usernameAndPassword(String username,
String password)
public final THIS enableAfterCreate()
public final THIS replaceExisting()
public final THIS jta(Boolean jta)
public final THIS useJavaContext(Boolean useJavaContext)
false will bind the datasource into global JNDI.
public final THIS connectable(Boolean connectable)
true will let to use CMR.
public final THIS maxPoolSize(int maxPoolSize)
public final THIS minPoolSize(int minPoolSize)
public final THIS statisticsEnabled(Boolean statisticsEnabled)
public final THIS useCcm(Boolean useCcm)
public final THIS newConnectionSql(String newConnectionSql)
public final THIS transactionIsolation(TransactionIsolation transactionIsolation)
public final THIS urlDelimiter(String urlDelimiter)
public final THIS urlSelectorStrategyClass(String urlSelectorStrategyClass)
public final THIS prefill(Boolean prefill)
public final THIS securityDomain(String securityDomain)
public final THIS reauthPluginClass(String reauthPluginClass)
public final THIS addReauthPluginProperty(String name,
String value)
reauthPluginClass
public final THIS addReauthPluginProperty(String name,
boolean value)
reauthPluginClass
public final THIS useStrictMinPoolSize(Boolean useStrictMinPoolSize)
minPoolSize should be considered a strictly.
public final THIS flushStrategy(PoolFlushStrategy flushStrategy)
PoolFlushStrategy.
public final THIS checkValidConnectionSql(String checkValidConnectionSql)
public final THIS validateOnMatch(Boolean validateOnMatch)
Typically exclusive to use of backgroundValidation.
public final THIS backgroundValidation(Boolean backgroundValidation)
Typically exclusive to use of validateOnMatch.
public final THIS backgroundValidationMillis(Integer backgroundValidationMillis)
public final THIS useFastFailAllocation(Boolean useFastFailAllocation)
public final THIS staleConnectionCheckerClass(String staleConnectionCheckerClass)
public final THIS addStaleConnectionCheckerProperty(String name,
String value)
staleConnectionCheckerClass
public final THIS addStaleConnectionCheckerProperty(String name,
boolean value)
staleConnectionCheckerClass
public final THIS validConnectionCheckerClass(String validConnectionCheckerClass)
public final THIS addValidConnectionCheckerProperty(String name,
String value)
validConnectionCheckerClass
public final THIS addValidConnectionCheckerProperty(String name,
boolean value)
validConnectionCheckerClass
public final THIS exceptionSorterClass(String exceptionSorterClass)
public final THIS addExceptionSorterProperty(String name,
String value)
exceptionSorterClass
public final THIS addExceptionSorterProperty(String name,
boolean value)
exceptionSorterClass
public final THIS spy(Boolean spy)
public final THIS blockingTimeoutWaitMillis(Integer blockingTimeoutWaitMillis)
public final THIS idleTimeoutMinutes(Integer idleTimeoutMinutes)
public final THIS setTxQueryTimeout(Boolean setTxQueryTimeout)
public final THIS allowMultipleUsers(Boolean allowMultipleUsers)
public final THIS queryTimeout(Integer queryTimeout)
public final THIS useTryLock(Integer useTryLock)
public final THIS allocationRetry(Integer allocationRetry)
public final THIS allocationRetryWaitMillis(Integer allocationRetryWaitMillis)
public final THIS trackPreparedStatements(TrackStatementType trackStatements)
public final THIS sharePreparedStatements(Boolean sharePreparedStatements)
public final THIS preparedStatementsCacheSize(Integer preparedStatementsCacheSize)
public final THIS managedConnectionPool(String managedConnectionPool)
public AddDataSource build()
protected final void check()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||