Class DruidAbstractDataSource

    • Field Detail

      • DEFAULT_MAX_ACTIVE_SIZE

        public static final int DEFAULT_MAX_ACTIVE_SIZE
        See Also:
        Constant Field Values
      • DEFAULT_VALIDATION_QUERY

        public static final String DEFAULT_VALIDATION_QUERY
      • DEFAULT_TEST_ON_BORROW

        public static final boolean DEFAULT_TEST_ON_BORROW
        See Also:
        Constant Field Values
      • DEFAULT_TEST_ON_RETURN

        public static final boolean DEFAULT_TEST_ON_RETURN
        See Also:
        Constant Field Values
      • DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS

        public static final long DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
        See Also:
        Constant Field Values
      • DEFAULT_TIME_BETWEEN_CONNECT_ERROR_MILLIS

        public static final long DEFAULT_TIME_BETWEEN_CONNECT_ERROR_MILLIS
        See Also:
        Constant Field Values
      • DEFAULT_NUM_TESTS_PER_EVICTION_RUN

        public static final int DEFAULT_NUM_TESTS_PER_EVICTION_RUN
        See Also:
        Constant Field Values
      • DEFAULT_TIME_CONNECT_TIMEOUT_MILLIS

        public static final int DEFAULT_TIME_CONNECT_TIMEOUT_MILLIS
        See Also:
        Constant Field Values
      • DEFAULT_TIME_SOCKET_TIMEOUT_MILLIS

        public static final int DEFAULT_TIME_SOCKET_TIMEOUT_MILLIS
        See Also:
        Constant Field Values
      • DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS

        public static final long DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS
        See Also:
        Constant Field Values
      • DEFAULT_MAX_EVICTABLE_IDLE_TIME_MILLIS

        public static final long DEFAULT_MAX_EVICTABLE_IDLE_TIME_MILLIS
        See Also:
        Constant Field Values
      • DEFAULT_PHY_TIMEOUT_MILLIS

        public static final long DEFAULT_PHY_TIMEOUT_MILLIS
        See Also:
        Constant Field Values
      • defaultAutoCommit

        protected volatile boolean defaultAutoCommit
      • defaultReadOnly

        protected volatile Boolean defaultReadOnly
      • defaultTransactionIsolation

        protected volatile Integer defaultTransactionIsolation
      • defaultCatalog

        protected volatile String defaultCatalog
      • username

        protected volatile String username
      • password

        protected volatile String password
      • jdbcUrl

        protected volatile String jdbcUrl
      • driverClass

        protected volatile String driverClass
      • driverClassLoader

        protected volatile ClassLoader driverClassLoader
      • connectProperties

        protected volatile Properties connectProperties
      • userCallback

        protected volatile NameCallback userCallback
      • initialSize

        protected volatile int initialSize
      • maxActive

        protected volatile int maxActive
      • minIdle

        protected volatile int minIdle
      • maxIdle

        protected volatile int maxIdle
      • maxWait

        protected volatile long maxWait
      • notFullTimeoutRetryCount

        protected int notFullTimeoutRetryCount
      • validationQuery

        protected volatile String validationQuery
      • validationQueryTimeout

        protected volatile int validationQueryTimeout
      • testOnBorrow

        protected volatile boolean testOnBorrow
      • testOnReturn

        protected volatile boolean testOnReturn
      • testWhileIdle

        protected volatile boolean testWhileIdle
      • poolPreparedStatements

        protected volatile boolean poolPreparedStatements
      • sharePreparedStatements

        protected volatile boolean sharePreparedStatements
      • maxPoolPreparedStatementPerConnectionSize

        protected volatile int maxPoolPreparedStatementPerConnectionSize
      • inited

        protected volatile boolean inited
      • initExceptionThrow

        protected volatile boolean initExceptionThrow
      • driver

        protected Driver driver
      • connectTimeout

        protected volatile int connectTimeout
      • socketTimeout

        protected volatile int socketTimeout
      • queryTimeout

        protected volatile int queryTimeout
      • transactionQueryTimeout

        protected volatile int transactionQueryTimeout
      • createTimespan

        protected long createTimespan
      • maxWaitThreadCount

        protected volatile int maxWaitThreadCount
      • accessToUnderlyingConnectionAllowed

        protected volatile boolean accessToUnderlyingConnectionAllowed
      • timeBetweenEvictionRunsMillis

        protected volatile long timeBetweenEvictionRunsMillis
      • numTestsPerEvictionRun

        protected volatile int numTestsPerEvictionRun
      • minEvictableIdleTimeMillis

        protected volatile long minEvictableIdleTimeMillis
      • maxEvictableIdleTimeMillis

        protected volatile long maxEvictableIdleTimeMillis
      • keepAliveBetweenTimeMillis

        protected volatile long keepAliveBetweenTimeMillis
      • phyTimeoutMillis

        protected volatile long phyTimeoutMillis
      • phyMaxUseCount

        protected volatile long phyMaxUseCount
      • removeAbandoned

        protected volatile boolean removeAbandoned
      • removeAbandonedTimeoutMillis

        protected volatile long removeAbandonedTimeoutMillis
      • logAbandoned

        protected volatile boolean logAbandoned
      • maxOpenPreparedStatements

        protected volatile int maxOpenPreparedStatements
      • connectionInitSqls

        protected volatile List<String> connectionInitSqls
      • dbTypeName

        protected volatile String dbTypeName
      • timeBetweenConnectErrorMillis

        protected volatile long timeBetweenConnectErrorMillis
      • usePingMethod

        protected volatile boolean usePingMethod
      • PRESENT

        protected static final Object PRESENT
      • id

        protected long id
      • connectionErrorRetryAttempts

        protected int connectionErrorRetryAttempts
      • breakAfterAcquireFailure

        protected boolean breakAfterAcquireFailure
      • transactionThresholdMillis

        protected long transactionThresholdMillis
      • createdTime

        protected final Date createdTime
      • initedTime

        protected Date initedTime
      • errorCount

        protected volatile long errorCount
      • dupCloseCount

        protected volatile long dupCloseCount
      • startTransactionCount

        protected volatile long startTransactionCount
      • commitCount

        protected volatile long commitCount
      • rollbackCount

        protected volatile long rollbackCount
      • cachedPreparedStatementHitCount

        protected volatile long cachedPreparedStatementHitCount
      • preparedStatementCount

        protected volatile long preparedStatementCount
      • closedPreparedStatementCount

        protected volatile long closedPreparedStatementCount
      • cachedPreparedStatementCount

        protected volatile long cachedPreparedStatementCount
      • cachedPreparedStatementDeleteCount

        protected volatile long cachedPreparedStatementDeleteCount
      • cachedPreparedStatementMissCount

        protected volatile long cachedPreparedStatementMissCount
      • userPasswordVersion

        protected volatile long userPasswordVersion
      • transactionHistogram

        protected final Histogram transactionHistogram
      • executeCount

        protected volatile long executeCount
      • executeQueryCount

        protected volatile long executeQueryCount
      • executeUpdateCount

        protected volatile long executeUpdateCount
      • executeBatchCount

        protected volatile long executeBatchCount
      • createError

        protected volatile Throwable createError
      • lastError

        protected volatile Throwable lastError
      • lastErrorTimeMillis

        protected volatile long lastErrorTimeMillis
      • lastCreateError

        protected volatile Throwable lastCreateError
      • lastCreateErrorTimeMillis

        protected volatile long lastCreateErrorTimeMillis
      • lastCreateStartTimeMillis

        protected volatile long lastCreateStartTimeMillis
      • isOracle

        protected boolean isOracle
      • isMySql

        protected boolean isMySql
      • useOracleImplicitCache

        protected boolean useOracleImplicitCache
      • activeConnectionLock

        protected ReentrantLock activeConnectionLock
      • createErrorCount

        protected volatile int createErrorCount
      • creatingCount

        protected volatile int creatingCount
      • directCreateCount

        protected volatile int directCreateCount
      • createCount

        protected volatile long createCount
      • destroyCount

        protected volatile long destroyCount
      • createStartNanos

        protected volatile long createStartNanos
      • timeBetweenLogStatsMillis

        protected long timeBetweenLogStatsMillis
      • asyncCloseConnectionEnable

        protected boolean asyncCloseConnectionEnable
      • maxCreateTaskCount

        protected int maxCreateTaskCount
      • failFast

        protected boolean failFast
      • failContinuous

        protected volatile int failContinuous
      • failContinuousTimeMillis

        protected volatile long failContinuousTimeMillis
      • netTimeoutExecutor

        protected Executor netTimeoutExecutor
      • netTimeoutError

        protected volatile boolean netTimeoutError
      • initVariants

        protected boolean initVariants
      • initGlobalVariants

        protected boolean initGlobalVariants
      • onFatalError

        protected volatile boolean onFatalError
      • onFatalErrorMaxActive

        protected volatile int onFatalErrorMaxActive
      • fatalErrorCount

        protected volatile int fatalErrorCount
      • fatalErrorCountLastShrink

        protected volatile int fatalErrorCountLastShrink
      • lastFatalErrorTimeMillis

        protected volatile long lastFatalErrorTimeMillis
      • lastFatalErrorSql

        protected volatile String lastFatalErrorSql
      • lastFatalError

        protected volatile Throwable lastFatalError
      • keepAliveError

        protected volatile Throwable keepAliveError
      • connectionIdSeed

        protected volatile long connectionIdSeed
      • statementIdSeed

        protected volatile long statementIdSeed
      • resultSetIdSeed

        protected volatile long resultSetIdSeed
      • transactionIdSeed

        protected volatile long transactionIdSeed
      • metaDataIdSeed

        protected volatile long metaDataIdSeed
    • Constructor Detail

      • DruidAbstractDataSource

        public DruidAbstractDataSource​(boolean lockFair)
        Constructs a new DruidAbstractDataSource with a specified lock fairness setting.
        Parameters:
        lockFair - a boolean value indicating whether the lock should be fair or not