Class ExecutorTrace
- java.lang.Object
-
- com.oracle.coherence.concurrent.executor.internal.ExecutorTrace
-
public class ExecutorTrace extends Object
Utility class used to trace executor processors, subscribers, and tasks.- Since:
- 21.12
- Author:
- lh
-
-
Field Summary
Fields Modifier and Type Field Description static intLOGLEVELLog level for ExecutorTrace messages
-
Constructor Summary
Constructors Constructor Description ExecutorTrace()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidentering(Class<?> clz, String sMethod, Object... params)Entry logging.static voidentering(Class<?> clz, String sMethod, Supplier<Object> params)Entry logging.static voidexiting(Class<?> clz, String sMethod)Exit logging.static voidexiting(Class<?> clz, String sMethod, Object result, Object... additionalInfo)Exit logging.static voidexiting(Class<?> clz, String sMethod, Object result, Supplier<Object> params)Exit logging.static booleanisEnabled()Return true if executor trace logging is enabled; false otherwise.static voidlog(String message)Log the specified message at the Debugging severity level.static voidlog(String message, Debugging debugging)Log the specified message with the given debugging option.static voidlog(Supplier<String> supplierMessage)Log the specified message at the Debugging severity level.static voidlog(Supplier<String> supplierMessage, Debugging debugging)Log the specified message with the given debugging option.static voidthrowing(Class<?> clz, String sMethod, Throwable throwable, Object... additionalInfo)Throwable logging.
-
-
-
Field Detail
-
LOGLEVEL
public static final int LOGLEVEL
Log level for ExecutorTrace messages- See Also:
- Constant Field Values
-
-
Method Detail
-
isEnabled
public static boolean isEnabled()
Return true if executor trace logging is enabled; false otherwise.- Returns:
trueif executor trace logging is enabled
-
log
public static void log(String message)
Log the specified message at the Debugging severity level. Default severity level is Logger.FINEST.- Parameters:
message- the message to log
-
log
public static void log(String message, Debugging debugging)
Log the specified message with the given debugging option.- Parameters:
message- the message to logdebugging- the debugging option
-
log
public static void log(Supplier<String> supplierMessage)
Log the specified message at the Debugging severity level. Default severity level is Logger.FINEST.The message is provided by the
Supplier, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage- the supplier of the message to log; only evaluated if the Debugging severity level should be logged
-
log
public static void log(Supplier<String> supplierMessage, Debugging debugging)
Log the specified message with the given debugging option.The message is provided by the
Supplier, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.- Parameters:
supplierMessage- the supplier of the message to log; only evaluated if the specified severity level should be loggeddebugging- the debugging option
-
entering
public static void entering(Class<?> clz, String sMethod, Object... params)
Entry logging.- Parameters:
clz- the sourceClasssMethod- the source methodparams- zero or more parameters to log- Throws:
NullPointerException- if eitherclzorsMethodarenull
-
entering
public static void entering(Class<?> clz, String sMethod, Supplier<Object> params)
Entry logging.- Parameters:
clz- the sourceClasssMethod- the source methodparams- zero or more parameters to log- Throws:
NullPointerException- if eitherclzorsMethodarenull- Since:
- 22.06
-
exiting
public static void exiting(Class<?> clz, String sMethod)
Exit logging.- Parameters:
clz- the sourceClasssMethod- the source method- Throws:
NullPointerException- if eitherclzorsMethodarenull
-
exiting
public static void exiting(Class<?> clz, String sMethod, Object result, Object... additionalInfo)
Exit logging.- Parameters:
clz- the sourceClasssMethod- the source methodresult- the result returned by the exiting methodadditionalInfo- zero or more additional state details at the time of exit- Throws:
NullPointerException- if eitherclzorsMethodarenull
-
exiting
public static void exiting(Class<?> clz, String sMethod, Object result, Supplier<Object> params)
Exit logging.- Parameters:
clz- the sourceClasssMethod- the source methodresult- the result returned by the exiting methodparams- zero or more additional state details at the time of exit- Throws:
NullPointerException- if eitherclzorsMethodarenull- Since:
- 22.06
-
throwing
public static void throwing(Class<?> clz, String sMethod, Throwable throwable, Object... additionalInfo)
Throwable logging.- Parameters:
clz- the sourceClasssMethod- the source methodthrowable- theExceptionbeing thrownadditionalInfo- zero or more additional state details at the time of exit- Throws:
NullPointerException- if any arguments arenull
-
-