use of org.sonar.process.cluster.health.NodeDetails in project sonarqube by SonarSource.
the class HealthActionSupport method toNode.
private static System.Node toNode(NodeHealth nodeHealth, System.Node.Builder nodeBuilder, System.Cause.Builder causeBuilder) {
nodeBuilder.clear();
nodeBuilder.setHealth(System.Health.valueOf(nodeHealth.getStatus().name()));
nodeHealth.getCauses().forEach(str -> nodeBuilder.addCauses(toCause(str, causeBuilder)));
NodeDetails details = nodeHealth.getDetails();
nodeBuilder.setType(System.NodeType.valueOf(details.getType().name())).setName(details.getName()).setHost(details.getHost()).setPort(details.getPort()).setStartedAt(formatDateTime(details.getStartedAt()));
return nodeBuilder.build();
}
Aggregations