use of org.apache.nifi.web.api.dto.CountersSnapshotDTO in project nifi by apache.
the class StandardNiFiServiceFacade method getCounters.
@Override
public CountersDTO getCounters() {
final List<Counter> counters = controllerFacade.getCounters();
final Set<CounterDTO> counterDTOs = new LinkedHashSet<>(counters.size());
for (final Counter counter : counters) {
counterDTOs.add(dtoFactory.createCounterDto(counter));
}
final CountersSnapshotDTO snapshotDto = dtoFactory.createCountersDto(counterDTOs);
final CountersDTO countersDto = new CountersDTO();
countersDto.setAggregateSnapshot(snapshotDto);
return countersDto;
}
Aggregations