public class DbPoolUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DbPoolUtil.HostAndPort
Host and port POJO.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
CSS_ALLOC |
static String |
CSS_STACK |
static String |
CSS_TRACEPT |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyFile(OutputStream os,
InputStream is)
Copies the inputstream to the output stream.
|
static void |
dumpLocation(String msg) |
static void |
enableRemoteDebug(Connection con,
DbPoolUtil.HostAndPort hostAndPort)
Executes dbms_debug_jdwp.connect_tcp(host, port) on specified connection.
|
static DbType |
getDbTypeByDriverName(String dn) |
static void |
getFilteredStacktrace(StringBuilder sb,
Throwable t)
Deprecated.
|
static String |
getLocation() |
static String |
getPlSqlDebug(String poolName)
Return the connect string if PL/SQL debugging is enabled for the specified pool.
|
static String |
getStack(Tracepoint tp) |
static void |
getThreadAndLocation(StringBuilder sb) |
static Driver |
loadDriver(File driverPath,
String driverClassName)
Loads the appropriate driver class.
|
static void |
printTracepoints(IPrinter p,
ConnectionProxy pc,
boolean full)
Print all tracepoints as a timestamp-since followed by a filtered stack trace.
|
static String |
q(String str) |
static void |
readAsString(StringBuilder sb,
Reader r) |
static String |
strCommad(long val)
Returns a properly formatted commad string for a number [english only].
|
static String |
strCountDur(long count,
long nanotime) |
static String |
strMilli(long a,
long b)
Report the delta time between a and b, as milli's.
|
static String |
strMillis(long ns) |
static String |
strMillisOLD(long dlt) |
static String |
strNanoTime(long ns)
Return a nanotime timestamp with 2 thousands of precision max.
|
static String |
strNanoTime2(long ns)
Return a nanotime timestamp with 2 thousands of precision max.
|
static String |
strSize(long sz)
Returns a string representing some size, in bytes.
|
static void |
strStacktraceFiltered(Appendable sb,
StackTraceElement[] se,
String[] skipbefore,
String[] skipafter,
int linelimit,
int indent) |
static void |
strStacktraceFiltered(Appendable sb,
Throwable t,
String[] skipbefore,
String[] skipafter,
int linelimit,
int indent)
Report a filtered location stack trace, where the start of the stack trace and the end can be removed.
|
static void |
strStacktraceFiltered(StringBuilder sb,
StackTraceElement[] se) |
static void |
strStacktraceFiltered(StringBuilder sb,
StackTraceElement[] se,
int linelimit,
int indent) |
static String |
strTime(Date dt) |
static String |
strTime(long ts) |
static String |
strTimeOnly(Date dt) |
public static final String CSS_ALLOC
public static final String CSS_TRACEPT
public static final String CSS_STACK
public static void strStacktraceFiltered(Appendable sb, Throwable t, String[] skipbefore, String[] skipafter, int linelimit, int indent)
sb - t - skipbefore - skipafter - public static void strStacktraceFiltered(Appendable sb, StackTraceElement[] se, String[] skipbefore, String[] skipafter, int linelimit, int indent)
public static void strStacktraceFiltered(StringBuilder sb, StackTraceElement[] se, int linelimit, int indent)
public static void strStacktraceFiltered(StringBuilder sb, StackTraceElement[] se)
@Deprecated public static void getFilteredStacktrace(StringBuilder sb, Throwable t)
sb - t - public static final void dumpLocation(String msg)
public static final void getThreadAndLocation(StringBuilder sb)
public static final String getLocation()
public static void copyFile(OutputStream os, InputStream is) throws IOException
destf - the destinationsrcf - the sourceIOException - the errorpublic static void readAsString(StringBuilder sb, Reader r) throws Exception
Exceptionpublic static String strMillisOLD(long dlt)
public static String strNanoTime(long ns)
ns - public static String strNanoTime2(long ns)
ns - public static String strMillis(long ns)
public static Driver loadDriver(File driverPath, String driverClassName) throws Exception
Exceptionpublic static void printTracepoints(IPrinter p, ConnectionProxy pc, boolean full)
sb - pc - public static String strMilli(long a, long b)
a - b - public static String strTime(long ts)
public static String strCommad(long val)
val - public static String strCountDur(long count, long nanotime)
public static String getStack(Tracepoint tp)
public static String strSize(long sz)
@Nullable public static String getPlSqlDebug(String poolName)
poolName - public static void enableRemoteDebug(@Nonnull Connection con, @Nonnull DbPoolUtil.HostAndPort hostAndPort) throws SQLException
con - hostAndPort - SQLExceptionCopyright © 2017 etc.to. All rights reserved.