public final class Tracer extends Object
Modifier and Type | Method and Description |
---|---|
static Trace |
current() |
static boolean |
isEnabled() |
static Trace |
newTrace(String name) |
static void |
setManager(TraceManager manager) |
static void |
trace(String name,
Runnable runnable) |
static <T> T |
trace(String name,
TraceRunnable<T> runnable) |
static void |
trace(Trace trace,
Runnable runnable) |
static <T> T |
trace(Trace trace,
TraceRunnable<T> runnable) |
static <T> T |
traceEx(String name,
Callable<T> callable) |
static <T> T |
traceEx(Trace trace,
Callable<T> callable) |
static void |
withCurrent(Consumer<Trace> consumer) |
public static boolean isEnabled()
public static Trace current()
public static <T> T trace(Trace trace, TraceRunnable<T> runnable)
public static <T> T traceEx(Trace trace, Callable<T> callable) throws Exception
Exception
public static <T> T trace(String name, TraceRunnable<T> runnable)
public static <T> T traceEx(String name, Callable<T> callable) throws Exception
Exception
public static void setManager(TraceManager manager)