pull/2241/merge
Yanming Zhou 5 months ago committed by GitHub
commit e95d4b5bae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -147,7 +147,7 @@ public class HikariConfig implements HikariConfigMXBean
/**
* Construct a HikariConfig from the specified property file name. <code>propertyFileName</code>
* will first be treated as a path in the file-system, and if that fails the
* Class.getResourceAsStream(propertyFileName) will be tried.
* <code>Class.getResourceAsStream(propertyFileName)</code> will be tried.
*
* @param propertyFileName the name of the property file
*/
@ -568,7 +568,7 @@ public class HikariConfig implements HikariConfigMXBean
}
/**
* Set whether or not pool suspension is allowed. There is a performance
* Set whether pool suspension is allowed. There is a performance
* impact when pool suspension is enabled. Unless you need it (for a
* redundancy system for example) do not enable it.
*
@ -952,7 +952,7 @@ public class HikariConfig implements HikariConfigMXBean
/**
* Set the default transaction isolation level. The specified value is the
* constant name from the <code>Connection</code> class, eg.
* constant name from the <code>Connection</code> class, for example:
* <code>TRANSACTION_REPEATABLE_READ</code>.
*
* @param isolationLevel the name of the isolation level

@ -19,7 +19,7 @@ package com.zaxxer.hikari;
import com.zaxxer.hikari.util.Credentials;
/**
* The javax.management MBean for a Hikari pool configuration.
* The {@code javax.management} MBean for a Hikari pool configuration.
*
* @author Brett Wooldridge
*/
@ -116,7 +116,7 @@ public interface HikariConfigMXBean
/**
* The property controls the minimum number of idle connections that HikariCP tries to maintain in the pool,
* including both idle and in-use connections. If the idle connections dip below this value, HikariCP will
* make a best effort to restore them quickly and efficiently.
* make the best effort to restore them quickly and efficiently.
*
* @return the minimum number of connections in the pool
*/
@ -125,7 +125,7 @@ public interface HikariConfigMXBean
/**
* The property controls the minimum number of idle connections that HikariCP tries to maintain in the pool,
* including both idle and in-use connections. If the idle connections dip below this value, HikariCP will
* make a best effort to restore them quickly and efficiently.
* make the best effort to restore them quickly and efficiently.
*
* @param minIdle the minimum number of idle connections in the pool to maintain
*/

@ -51,7 +51,7 @@ public class HikariDataSource extends HikariConfig implements DataSource, Closea
* this constructor vs. {@link #HikariDataSource(HikariConfig)} will
* result in {@link #getConnection()} performance that is slightly lower
* due to lazy initialization checks.
*
* <p>
* The first call to {@link #getConnection()} starts the pool. Once the pool
* is started, the configuration is "sealed" and no further configuration
* changes are possible -- except via {@link HikariConfigMXBean} methods.
@ -65,7 +65,7 @@ public class HikariDataSource extends HikariConfig implements DataSource, Closea
* Construct a HikariDataSource with the specified configuration. The
* {@link HikariConfig} is copied and the pool is started by invoking this
* constructor.
*
* <p>
* The {@link HikariConfig} can be modified without affecting the HikariDataSource
* and used to initialize another HikariDataSource instance.
*

@ -19,7 +19,7 @@ package com.zaxxer.hikari;
import javax.sql.DataSource;
/**
* The javax.management MBean for a Hikari pool instance.
* The {@code javax.management} MBean for a Hikari pool instance.
*
* @author Brett Wooldridge
*/

@ -6,7 +6,7 @@ import java.sql.SQLException;
* Users can implement this interface to override the default SQLException handling
* of HikariCP. By the time an instance of this interface is invoked HikariCP has
* already made a determination to evict the Connection from the pool.
*
* <p>
* If the {@link #adjudicate(SQLException)} method returns {@link Override#CONTINUE_EVICT} the eviction will occur, but if the
* method returns {@link Override#DO_NOT_EVICT} the eviction will be elided.
*/

@ -605,7 +605,7 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag
/**
* "Soft" evict a Connection (/PoolEntry) from the pool. If this method is being called by the user directly
* through {@link com.zaxxer.hikari.HikariDataSource#evictConnection(Connection)} then {@code owner} is {@code true}.
*
* <p>
* If the caller is the owner, or if the Connection is idle (i.e. can be "reserved" in the {@link ConcurrentBag}),
* then we can close the connection immediately. Otherwise, we leave it "marked" for eviction so that it is evicted
* the next time someone tries to acquire it from the pool.
@ -683,7 +683,7 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag
* timeout, e.g. a SQLException thrown by the driver while trying to create a new Connection, then use the
* SQL State from that exception as our own and additionally set that exception as the "next" SQLException inside
* our exception.
*
* <p>
* As a side effect, log the timeout failure at DEBUG, and record the timeout failure in the metrics tracker.
*
* @param startTime the start time (timestamp) of the acquisition attempt
@ -769,7 +769,7 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag
/**
* We only create connections if we need another idle connection or have threads still waiting
* for a new connection. Otherwise we bail out of the request to create.
* for a new connection. Otherwise, we bail out of the request to create.
*
* @return true if we should create a connection, false if the need has disappeared
*/

@ -347,7 +347,7 @@ abstract class PoolBase
/**
* Obtain connection from data source.
*
* @return a Connection connection
* @return a connection
*/
private Connection newConnection() throws Exception
{
@ -388,7 +388,7 @@ abstract class PoolBase
}
/**
* Setup a connection initial state.
* Set up a connection initial state.
*
* @param connection a Connection
* @throws ConnectionSetupException thrown if any exception is encountered
@ -630,7 +630,7 @@ abstract class PoolBase
/**
* This will create a string for debug logging. Given a set of "reset bits", this
* method will return a concatenated string, for example:
*
* <p>
* Input : 0b00110
* Output: "autoCommit, isolation"
*

@ -26,7 +26,7 @@ import java.util.concurrent.ScheduledExecutorService;
*/
class ProxyLeakTaskFactory
{
private ScheduledExecutorService executorService;
private final ScheduledExecutorService executorService;
private long leakDetectionThreshold;
ProxyLeakTaskFactory(final long leakDetectionThreshold, final ScheduledExecutorService executorService)

@ -56,7 +56,7 @@ public abstract class ProxyResultSet implements ResultSet
/** {@inheritDoc} */
@Override
public final Statement getStatement() throws SQLException
public final Statement getStatement()
{
return statement;
}

@ -34,7 +34,7 @@ import java.util.concurrent.TimeUnit;
*/
public interface ClockSource
{
static ClockSource CLOCK = Factory.create();
ClockSource CLOCK = Factory.create();
/**
* Get the current time-stamp (resolution is opaque).
@ -142,7 +142,7 @@ public interface ClockSource
/**
* Get the TimeUnit the ClockSource is denominated in.
* @return
* @return the TimeUnit
*/
static TimeUnit getSourceTimeUnit() {
return CLOCK.getSourceTimeUnit0();

@ -289,7 +289,7 @@ public class ConcurrentBag<T extends IConcurrentBagEntry> implements AutoCloseab
* the <code>unreserve(T)</code> method.
*
* @param bagEntry the item to reserve
* @return true if the item was able to be reserved, false otherwise
* @return true if the item is able to reserve, false otherwise
*/
public boolean reserve(final T bagEntry)
{

@ -152,13 +152,13 @@ public final class DriverDataSource implements DataSource
}
@Override
public void setLoginTimeout(int seconds) throws SQLException
public void setLoginTimeout(int seconds)
{
DriverManager.setLoginTimeout(seconds);
}
@Override
public int getLoginTimeout() throws SQLException
public int getLoginTimeout()
{
return DriverManager.getLoginTimeout();
}

@ -30,7 +30,7 @@ import java.util.Set;
/**
* This class generates the proxy objects for {@link Connection}, {@link Statement},
* {@link PreparedStatement}, and {@link CallableStatement}. Additionally it injects
* {@link PreparedStatement}, and {@link CallableStatement}. Additionally, it injects
* method bodies into the {@link ProxyFactory} class methods that can instantiate
* instances of the generated proxies.
*
@ -186,7 +186,7 @@ public final class JavassistProxyFactory
}
}
catch (NotFoundException e) {
// fall thru
// fall through
}
return false;

@ -43,7 +43,7 @@ public final class UtilityElf
/**
*
* @return null if string is null or empty, , trimmed string otherwise
* @return null if string is null or empty, trimmed string otherwise
*/
public static String getNullIfEmpty(final String text)
{

Loading…
Cancel
Save