public final class PoolUtilities extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
IS_JAVA7 |
| Constructor and Description |
|---|
PoolUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
createInstance(String className,
Class<T> clazz,
Object... args) |
static ThreadPoolExecutor |
createThreadPoolExecutor(int queueSize,
String threadName) |
static long |
elapsedTimeMs(long start)
Get the elapsed time in millisecond between the specified start time and now.
|
static void |
executeSqlAutoCommit(Connection connection,
String sql)
Execute the user-specified init SQL.
|
static void |
quietlyCloseConnection(Connection connection) |
static void |
quietlySleep(long millis) |
public static void quietlyCloseConnection(Connection connection)
public static long elapsedTimeMs(long start)
start - the start timepublic static void executeSqlAutoCommit(Connection connection, String sql) throws SQLException
connection - the connection to initializesql - the SQL to executeSQLException - throws if the init SQL execution failspublic static void quietlySleep(long millis)
public static ThreadPoolExecutor createThreadPoolExecutor(int queueSize, String threadName)
Copyright © 2014 Zaxxer.com. All rights reserved.