Class TimeBasedDirectoryCleanerHealthCheck
java.lang.Object
com.codahale.metrics.health.HealthCheck
org.kiwiproject.dropwizard.metrics.health.TimeBasedDirectoryCleanerHealthCheck
public class TimeBasedDirectoryCleanerHealthCheck
extends com.codahale.metrics.health.HealthCheck
A health check for
TimeBasedDirectoryCleaner that checks if there have been any delete errors within
a specific duration of time. Errors older than the warning threshold will not cause this to report as unhealthy;
it will report unhealthy only if there are errors within the warning threshold.-
Nested Class Summary
Nested classes/interfaces inherited from class com.codahale.metrics.health.HealthCheck
com.codahale.metrics.health.HealthCheck.Result, com.codahale.metrics.health.HealthCheck.ResultBuilder -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate with specifiedTimeBasedDirectoryCleanerand the default warning threshold.TimeBasedDirectoryCleanerHealthCheck(TimeBasedDirectoryCleaner cleaner, Duration warningThreshold) Create with the specifiedTimeBasedDirectoryCleanerand warning threshold. -
Method Summary
Modifier and TypeMethodDescriptionprotected com.codahale.metrics.health.HealthCheck.Resultcheck()Methods inherited from class com.codahale.metrics.health.HealthCheck
clock, execute
-
Field Details
-
DEFAULT_DELETE_ERROR_THRESHOLD
-
-
Constructor Details
-
TimeBasedDirectoryCleanerHealthCheck
Create with specifiedTimeBasedDirectoryCleanerand the default warning threshold.- Parameters:
cleaner- the TimeBasedDirectoryCleaner to use- See Also:
-
TimeBasedDirectoryCleanerHealthCheck
public TimeBasedDirectoryCleanerHealthCheck(TimeBasedDirectoryCleaner cleaner, Duration warningThreshold) Create with the specifiedTimeBasedDirectoryCleanerand warning threshold.- Parameters:
cleaner- the TimeBasedDirectoryCleaner to usewarningThreshold- the warning threshold
-
-
Method Details
-
check
protected com.codahale.metrics.health.HealthCheck.Result check()- Specified by:
checkin classcom.codahale.metrics.health.HealthCheck
-