Package io.perfmark.impl
Class ThreadRefInfo
- java.lang.Object
-
- io.perfmark.impl.ThreadInfo
-
- io.perfmark.impl.ThreadRefInfo
-
final class ThreadRefInfo extends ThreadInfo
-
-
Field Summary
Fields Modifier and Type Field Description private longthreadIdprivate java.lang.StringthreadNameprivate ThreadRefthreadRef
-
Constructor Summary
Constructors Constructor Description ThreadRefInfo(ThreadRef threadRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetId()The most recent ID of the thread.java.lang.StringgetName()The most recent name of the thread.booleanisCurrentThread()booleanisTerminated()Returnstrueif the thread has been GC'd or is terminated.private longmaybeUpdateThreadId(long threadId, long localThreadId)private java.lang.StringmaybeUpdateThreadName(java.lang.String tName, java.lang.String localThreadName)
-
-
-
Field Detail
-
threadRef
private final ThreadRef threadRef
-
threadName
private volatile java.lang.String threadName
-
threadId
private volatile long threadId
-
-
Constructor Detail
-
ThreadRefInfo
ThreadRefInfo(ThreadRef threadRef)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from class:ThreadInfoThe most recent name of the thread. Non-null.- Specified by:
getNamein classThreadInfo
-
getId
public long getId()
Description copied from class:ThreadInfoThe most recent ID of the thread.- Specified by:
getIdin classThreadInfo
-
maybeUpdateThreadName
private java.lang.String maybeUpdateThreadName(java.lang.String tName, java.lang.String localThreadName)
-
maybeUpdateThreadId
private long maybeUpdateThreadId(long threadId, long localThreadId)
-
isTerminated
public boolean isTerminated()
Description copied from class:ThreadInfoReturnstrueif the thread has been GC'd or is terminated.- Specified by:
isTerminatedin classThreadInfo
-
isCurrentThread
public boolean isCurrentThread()
- Specified by:
isCurrentThreadin classThreadInfo
-
-