public class ExecutionResult extends Object implements Comparable<ExecutionResult>, HealthCheckExecutionResult
HealthCheck
.Constructor and Description |
---|
ExecutionResult(HealthCheckMetadata metadata,
Result.Status status,
String errorMessage,
long elapsedTime,
boolean timedOut)
Shortcut constructor to create error/timed out result.
|
ExecutionResult(HealthCheckMetadata metadata,
Result simpleResult,
long elapsedTimeInMs)
Shortcut constructor for a result
|
ExecutionResult(HealthCheckMetadata metadata,
Result simpleResult,
long elapsedTimeInMs,
boolean timedout)
Full constructor
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ExecutionResult otherResult)
Natural order of results (failed results are sorted before ok results).
|
long |
getElapsedTimeInMs()
Get the elapsed time in ms
|
Date |
getFinishedAt()
Get the date, the health check finished or if the
execution timed out, the execution was aborted.
|
HealthCheckMetadata |
getHealthCheckMetadata()
Get the meta data about the health check service
|
Result |
getHealthCheckResult()
Get the result of the health check run.
|
boolean |
hasTimedOut()
Returns true if the execution has timed out.
|
String |
toString() |
public ExecutionResult(HealthCheckMetadata metadata, Result simpleResult, long elapsedTimeInMs, boolean timedout)
public ExecutionResult(HealthCheckMetadata metadata, Result simpleResult, long elapsedTimeInMs)
public ExecutionResult(HealthCheckMetadata metadata, Result.Status status, String errorMessage, long elapsedTime, boolean timedOut)
public Result getHealthCheckResult()
HealthCheckExecutionResult
getHealthCheckResult
in interface HealthCheckExecutionResult
public long getElapsedTimeInMs()
HealthCheckExecutionResult
getElapsedTimeInMs
in interface HealthCheckExecutionResult
public HealthCheckMetadata getHealthCheckMetadata()
HealthCheckExecutionResult
getHealthCheckMetadata
in interface HealthCheckExecutionResult
public Date getFinishedAt()
HealthCheckExecutionResult
getFinishedAt
in interface HealthCheckExecutionResult
public boolean hasTimedOut()
HealthCheckExecutionResult
hasTimedOut
in interface HealthCheckExecutionResult
true
if execution timed out.public int compareTo(ExecutionResult otherResult)
compareTo
in interface Comparable<ExecutionResult>
Copyright © 2013–2014 The Apache Software Foundation. All rights reserved.