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!
| Modifier and Type | Class and Description |
|---|---|
static class |
AddDataSource.Builder<THIS extends AddDataSource.Builder>
Builder for configuration attributes of a datasource.
|
NOOPNOOP| Modifier | Constructor and Description |
|---|---|
protected |
AddDataSource(AddDataSource.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(OfflineCommandContext ctx) |
void |
apply(OnlineCommandContext ctx) |
protected void |
modifyIfNeeded(ServerVersion serverVersion) |
String |
toString() |
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 String datasourceClass
protected String driverClass
protected String driverName
protected String exceptionSorterClass
protected Integer idleTimeoutMinutes
protected Boolean jta
protected String managedConnectionPool
protected Integer maxPoolSize
protected Integer minPoolSize
protected String newConnectionSql
protected String password
protected PoolFlushStrategy flushStrategy
protected Boolean prefill
protected Integer preparedStatementCacheSize
protected Integer queryTimeout
protected String reauthPluginClass
protected String securityDomain
protected Boolean setTxQueryTimeout
protected Boolean sharePreparedStatements
protected Boolean spy
protected String staleConnectionCheckerClass
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 Boolean useStrictMinPoolSize
protected Integer useTryLock
protected String username
protected Boolean validateOnMatch
protected String validConnectionCheckerClass
protected AddDataSource(AddDataSource.Builder builder)
public final void apply(OnlineCommandContext ctx) throws IOException, CommandFailedException
apply in interface OnlineCommandIOExceptionCommandFailedExceptionpublic final void apply(OfflineCommandContext ctx) throws CommandFailedException, IOException
apply in interface OfflineCommandCommandFailedExceptionIOExceptionprotected void modifyIfNeeded(ServerVersion serverVersion)
public final String toString()
toString in interface OfflineCommandtoString in interface OnlineCommandtoString in class ObjectCopyright © 2022. All rights reserved.