use of org.apache.nifi.controller.ActiveThreadInfo in project nifi by apache.
the class DtoFactory method createThreadDumpDtos.
private List<ThreadDumpDTO> createThreadDumpDtos(final ProcessorNode procNode) {
final List<ThreadDumpDTO> threadDumps = new ArrayList<>();
final List<ActiveThreadInfo> activeThreads = procNode.getActiveThreads();
for (final ActiveThreadInfo threadInfo : activeThreads) {
final ThreadDumpDTO dto = new ThreadDumpDTO();
dto.setStackTrace(threadInfo.getStackTrace());
dto.setThreadActiveMillis(threadInfo.getActiveMillis());
dto.setThreadName(threadInfo.getThreadName());
dto.setTaskTerminated(threadInfo.isTerminated());
threadDumps.add(dto);
}
return threadDumps;
}
Aggregations