public final class JvmUtils extends Object
ManagementFactory.| Modifier and Type | Method and Description |
|---|---|
static Collection<ThreadInfo> |
createThreadDump()
Creates a thread dump of the current JVM.
|
static Map<Long,ThreadInfoSample> |
createThreadInfoSample(Collection<Long> threadIds,
int maxStackTraceDepth)
Creates a
ThreadInfoSample for a specific thread. |
static Optional<ThreadInfoSample> |
createThreadInfoSample(long threadId,
int maxStackTraceDepth)
Creates a
ThreadInfoSample for a specific thread. |
public static Collection<ThreadInfo> createThreadDump()
public static Optional<ThreadInfoSample> createThreadInfoSample(long threadId, int maxStackTraceDepth)
ThreadInfoSample for a specific thread. Contains thread traces if
maxStackTraceDepth > 0.threadId - The ID of the thread to create the thread dump for.maxStackTraceDepth - The maximum number of entries in the stack trace to be collected.public static Map<Long,ThreadInfoSample> createThreadInfoSample(Collection<Long> threadIds, int maxStackTraceDepth)
ThreadInfoSample for a specific thread. Contains thread traces if
maxStackTraceDepth > 0.threadIds - The IDs of the threads to create the thread dump for.maxStackTraceDepth - The maximum number of entries in the stack trace to be collected.Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.