Class ThreadInfoSample
- java.lang.Object
-
- org.apache.flink.runtime.messages.ThreadInfoSample
-
- All Implemented Interfaces:
Serializable
public class ThreadInfoSample extends Object implements Serializable
A serializable wrapper container for transferring parts of theThreadInfo.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Optional<ThreadInfoSample>from(ThreadInfo threadInfo)Constructs aThreadInfoSamplefromThreadInfo.static Map<Long,ThreadInfoSample>from(Collection<ThreadInfo> threadInfos)Constructs a collection ofThreadInfoSamples from a collection ofThreadInfosamples.StackTraceElement[]getStackTrace()Thread.StategetThreadState()
-
-
-
Method Detail
-
from
public static Optional<ThreadInfoSample> from(@Nullable ThreadInfo threadInfo)
Constructs aThreadInfoSamplefromThreadInfo.- Parameters:
threadInfo-ThreadInfowhere the data will be copied from.- Returns:
- an Optional containing the
ThreadInfoSampleif thethreadInfois not null and an empty Optional otherwise.
-
from
public static Map<Long,ThreadInfoSample> from(Collection<ThreadInfo> threadInfos)
Constructs a collection ofThreadInfoSamples from a collection ofThreadInfosamples.- Parameters:
threadInfos- the collection ofThreadInfo.- Returns:
- the collection of the corresponding
ThreadInfoSamples.
-
getThreadState
public Thread.State getThreadState()
-
getStackTrace
public StackTraceElement[] getStackTrace()
-
-