Package org.codelibs.fess.util
Class ThreadDumpUtil
java.lang.Object
org.codelibs.fess.util.ThreadDumpUtil
Utility class for generating and writing thread dumps.
Provides methods to capture thread information for debugging purposes.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrivate constructor to prevent instantiation of this utility class. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidPrints thread dump information to the logger at INFO level.static voidPrints thread dump information to the logger at ERROR level.static voidPrints thread dump information to the logger at WARN level.static voidprocessThreadDump(Consumer<String> writer) Processes all thread information and sends it to the provided consumer.static voidwriteThreadDump(String file) Writes thread dump information to the specified file.
-
Constructor Details
-
ThreadDumpUtil
protected ThreadDumpUtil()Private constructor to prevent instantiation of this utility class.
-
-
Method Details
-
printThreadDump
public static void printThreadDump()Prints thread dump information to the logger at INFO level. -
printThreadDumpAsWarn
public static void printThreadDumpAsWarn()Prints thread dump information to the logger at WARN level. -
printThreadDumpAsError
public static void printThreadDumpAsError()Prints thread dump information to the logger at ERROR level. -
writeThreadDump
Writes thread dump information to the specified file.- Parameters:
file- the file path to write the thread dump to
-
processThreadDump
Processes all thread information and sends it to the provided consumer.- Parameters:
writer- the consumer that will handle each line of thread dump output
-