org.wildfly.extras.creaper.commands.datasources
Class AddDataSource

java.lang.Object
  extended by org.wildfly.extras.creaper.commands.datasources.AddDataSource
All Implemented Interfaces:
Command, OfflineCommand, OnlineCommand
Direct Known Subclasses:
AddDb2DataSource, AddMariaDbDataSource, AddMssqlDataSource, AddMysqlDataSource, AddOracleDataSource, AddPostgresPlusDataSource, AddPostgreSqlDataSource, AddSybaseDataSource

public class AddDataSource
extends Object
implements OnlineCommand, OfflineCommand

A generic command for creating new datasource. For well-known databases, it's preferred to use the subclasses, because they apply some common configuration. This class is supposed to be used for unknown databases or when absolute control is desired.

Note that the datasources are always created as disabled, unless AddDataSource.Builder.enableAfterCreate() is used!

See Also:
AddDb2DataSource, AddMssqlDataSource, AddMysqlDataSource, AddOracleDataSource, AddPostgresPlusDataSource, AddPostgreSqlDataSource, AddSybaseDataSource

Nested Class Summary
static class AddDataSource.Builder<THIS extends AddDataSource.Builder>
          Builder for configuration attributes of a datasource.
 
Field Summary
protected  Integer allocationRetry
           
protected  Integer allocationRetryWaitMillis
           
protected  Boolean allowMultipleUsers
           
protected  Boolean backgroundValidation
           
protected  Integer backgroundValidationMillis
           
protected  Integer blockingTimeoutMillis
           
protected  String checkValidConnectionSql
           
protected  Boolean connectable
           
protected  Map<String,String> connectionProperties
           
protected  String datasourceClass
           
protected  String driverClass
           
protected  String driverName
           
protected  String exceptionSorterClass
           
protected  Map<String,String> exceptionSorterProperties
           
protected  PoolFlushStrategy flushStrategy
           
protected  Integer idleTimeoutMinutes
           
protected  Boolean jta
           
protected  String managedConnectionPool
           
protected  Integer maxPoolSize
           
protected  Integer minPoolSize
           
protected  String newConnectionSql
           
protected  String password
           
protected  Boolean prefill
           
protected  Integer preparedStatementCacheSize
           
protected  Integer queryTimeout
           
protected  String reauthPluginClass
           
protected  Map<String,String> reauthPluginProperties
           
protected  String securityDomain
           
protected  Boolean setTxQueryTimeout
           
protected  Boolean sharePreparedStatements
           
protected  Boolean spy
           
protected  String staleConnectionCheckerClass
           
protected  Map<String,String> staleConnectionCheckerProperties
           
protected  Boolean statisticsEnabled
           
protected  TrackStatementType trackStatements
           
protected  TransactionIsolation transactionIsolation
           
protected  String urlDelimiter
           
protected  String urlSelectorStrategyClass
           
protected  Boolean useCcm
           
protected  Boolean useFastFailAllocation
           
protected  Boolean useJavaContext
           
protected  String username
           
protected  Boolean useStrictMinPoolSize
           
protected  Integer useTryLock
           
protected  Boolean validateOnMatch
           
protected  String validConnectionCheckerClass
           
protected  Map<String,String> validConnectionCheckerProperties
           
 
Fields inherited from interface org.wildfly.extras.creaper.core.online.OnlineCommand
NOOP
 
Fields inherited from interface org.wildfly.extras.creaper.core.offline.OfflineCommand
NOOP
 
Constructor Summary
protected AddDataSource(AddDataSource.Builder builder)
           
 
Method Summary
 void apply(OfflineCommandContext ctx)
           
 void apply(OnlineCommandContext ctx)
           
protected  void modifyIfNeeded(ServerVersion serverVersion)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

allocationRetry

protected Integer allocationRetry

allocationRetryWaitMillis

protected Integer allocationRetryWaitMillis

allowMultipleUsers

protected Boolean allowMultipleUsers

backgroundValidation

protected Boolean backgroundValidation

backgroundValidationMillis

protected Integer backgroundValidationMillis

blockingTimeoutMillis

protected Integer blockingTimeoutMillis

checkValidConnectionSql

protected String checkValidConnectionSql

connectable

protected Boolean connectable

connectionProperties

protected Map<String,String> connectionProperties

datasourceClass

protected String datasourceClass

driverClass

protected String driverClass

driverName

protected String driverName

exceptionSorterClass

protected String exceptionSorterClass

exceptionSorterProperties

protected Map<String,String> exceptionSorterProperties

idleTimeoutMinutes

protected Integer idleTimeoutMinutes

jta

protected Boolean jta

managedConnectionPool

protected String managedConnectionPool

maxPoolSize

protected Integer maxPoolSize

minPoolSize

protected Integer minPoolSize

newConnectionSql

protected String newConnectionSql

password

protected String password

flushStrategy

protected PoolFlushStrategy flushStrategy

prefill

protected Boolean prefill

preparedStatementCacheSize

protected Integer preparedStatementCacheSize

queryTimeout

protected Integer queryTimeout

reauthPluginClass

protected String reauthPluginClass

reauthPluginProperties

protected Map<String,String> reauthPluginProperties

securityDomain

protected String securityDomain

setTxQueryTimeout

protected Boolean setTxQueryTimeout

sharePreparedStatements

protected Boolean sharePreparedStatements

spy

protected Boolean spy

staleConnectionCheckerClass

protected String staleConnectionCheckerClass

staleConnectionCheckerProperties

protected Map<String,String> staleConnectionCheckerProperties

statisticsEnabled

protected Boolean statisticsEnabled

trackStatements

protected TrackStatementType trackStatements

transactionIsolation

protected TransactionIsolation transactionIsolation

urlDelimiter

protected String urlDelimiter

urlSelectorStrategyClass

protected String urlSelectorStrategyClass

useCcm

protected Boolean useCcm

useFastFailAllocation

protected Boolean useFastFailAllocation

useJavaContext

protected Boolean useJavaContext

useStrictMinPoolSize

protected Boolean useStrictMinPoolSize

useTryLock

protected Integer useTryLock

username

protected String username

validateOnMatch

protected Boolean validateOnMatch

validConnectionCheckerClass

protected String validConnectionCheckerClass

validConnectionCheckerProperties

protected Map<String,String> validConnectionCheckerProperties
Constructor Detail

AddDataSource

protected AddDataSource(AddDataSource.Builder builder)
Method Detail

apply

public final void apply(OnlineCommandContext ctx)
                 throws IOException,
                        CommandFailedException
Specified by:
apply in interface OnlineCommand
Throws:
IOException
CommandFailedException

apply

public final void apply(OfflineCommandContext ctx)
                 throws CommandFailedException,
                        IOException
Specified by:
apply in interface OfflineCommand
Throws:
CommandFailedException
IOException

modifyIfNeeded

protected void modifyIfNeeded(ServerVersion serverVersion)

toString

public final String toString()
Specified by:
toString in interface OfflineCommand
Specified by:
toString in interface OnlineCommand
Overrides:
toString in class Object


Copyright © 2020. All rights reserved.