/** Thread constructor * @param connectionPartition partition to monitor * @param pool Pool handle. */ public PoolWatchThread(ConnectionPartition connectionPartition, BoneCP pool) { this.partition = connectionPartition; this.pool = pool; this.lazyInit = this.pool.getConfig().isLazyInit(); this.acquireRetryDelayInMs = this.pool.getConfig().getAcquireRetryDelayInMs(); this.poolAvailabilityThreshold = this.pool.getConfig().getPoolAvailabilityThreshold(); }
acquireConfig.setLogMessage("Failed to obtain initial connection"); if (!config.isLazyInit()) { try { Connection sanityConnection = obtainRawInternalConnection(); if (!config.isLazyInit()) { for (int i = 0; i < config.getMinConnectionsPerPartition(); i++) { this.partitions[p].addFreeConnection(new ConnectionHandle(null, this.partitions[p], this, false));
acquireConfig.setLogMessage("Failed to obtain initial connection"); if (!config.isLazyInit()){ try{ Connection sanityConnection = obtainRawInternalConnection(); if (!config.isLazyInit()){ for (int i=0; i < config.getMinConnectionsPerPartition(); i++){ this.partitions[p].addFreeConnection(new ConnectionHandle(null, this.partitions[p], this, false));
&& Objects.equal(this.username, that.getUsername()) && Objects.equal(this.password, that.getPassword()) && Objects.equal(this.lazyInit, that.isLazyInit()) && Objects.equal(this.transactionRecoveryEnabled, that.isTransactionRecoveryEnabled()) && Objects.equal(this.acquireRetryAttempts, that.getAcquireRetryAttempts())