diff options
Diffstat (limited to 'feature-healthcheck/src/main/java')
2 files changed, 16 insertions, 0 deletions
diff --git a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java index 06331bcc..c62f347e 100644 --- a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java +++ b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java @@ -80,6 +80,11 @@ public interface HealthCheck extends Startable { private String message; + /** + * Create a report. + * + * @param report the report to create + */ public Report(Report report) { this.startTime = report.startTime; this.code = report.code; @@ -91,6 +96,11 @@ public interface HealthCheck extends Startable { this.url = report.url; } + /** + * Set the end time on the report as now. + * + * @return the report + */ public Report setEndTime() { setEndTime(System.currentTimeMillis()); setElapsedTime(endTime - startTime); @@ -109,6 +119,11 @@ public interface HealthCheck extends Startable { private long elapsedTime; private List<Report> details = new ArrayList<>(); + /** + * Set the end time on the report as now. + * + * @return the report + */ public Reports setEndTime() { this.endTime = System.currentTimeMillis(); this.elapsedTime = this.endTime - this.startTime; diff --git a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java index 59d0bfbe..daedcc20 100644 --- a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java +++ b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java @@ -229,6 +229,7 @@ public class HealthCheckManager implements HealthCheck { return report; } + @SuppressWarnings("unchecked") protected <T> CompletableFuture<Report>[] futures(List<T> entities) { return entities.stream() .map(this::supplier) |