public final class RecordedThread extends RecordedObject
| Modifier and Type | Method | Description | 
|---|---|---|
| long | getId() | Returns a unique ID for both native threads and Java threads that can't be reused within the lifespan of the JVM. | 
| String | getJavaName() | Returns the Java thread name, or  nullif doesn't exist. | 
| long | getJavaThreadId() | Returns the Java thread ID, or  -1if it's not a Java thread. | 
| String | getOSName() | Returns the thread name used by the operating system. | 
| long | getOSThreadId() | Returns the thread ID used by the operating system. | 
| RecordedThreadGroup | getThreadGroup() | Returns the Java thread group, if available. | 
| boolean | isVirtual() | Returns  trueif this is a virtual Thread,falseotherwise. | 
getBoolean, getByte, getChar, getClass, getDouble, getDuration, getFields, getFloat, getInstant, getInt, getLong, getShort, getString, getThread, getValue, hasField, toString
public String getOSName()
null if doesn't existpublic long getOSThreadId()
-1 if doesn't existpublic RecordedThreadGroup getThreadGroup()
null if doesn't existpublic String getJavaName()
null if doesn't exist.  Returns java.lang.Thread.getName() if the thread has a Java representation. null otherwise.
null if doesn't existpublic long getJavaThreadId()
-1 if it's not a Java thread.-1 if it's not a Java threadpublic long getId()
 See getJavaThreadId() for the ID that is returned by java.lang.Thread.threadId(). 
 See getOSThreadId() for the ID that is returned by the operating system.
public boolean isVirtual()
true if this is a virtual Thread, false otherwise.true if this is a virtual Thread, false otherwise
    © 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
    https://docs.oracle.com/en/java/javase/21/docs/api/jdk.jfr/jdk/jfr/consumer/RecordedThread.html