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 aThreadInfoSample
fromThreadInfo
.static Map<Long,ThreadInfoSample>
from(Collection<ThreadInfo> threadInfos)
Constructs a collection ofThreadInfoSample
s from a collection ofThreadInfo
samples.StackTraceElement[]
getStackTrace()
Thread.State
getThreadState()
-
-
-
Method Detail
-
from
public static Optional<ThreadInfoSample> from(@Nullable ThreadInfo threadInfo)
Constructs aThreadInfoSample
fromThreadInfo
.- Parameters:
threadInfo
-ThreadInfo
where the data will be copied from.- Returns:
- an Optional containing the
ThreadInfoSample
if thethreadInfo
is not null and an empty Optional otherwise.
-
from
public static Map<Long,ThreadInfoSample> from(Collection<ThreadInfo> threadInfos)
Constructs a collection ofThreadInfoSample
s from a collection ofThreadInfo
samples.- Parameters:
threadInfos
- the collection ofThreadInfo
.- Returns:
- the collection of the corresponding
ThreadInfoSample
s.
-
getThreadState
public Thread.State getThreadState()
-
getStackTrace
public StackTraceElement[] getStackTrace()
-
-