Class TimeBasedDirectoryCleanerHealthCheck
- java.lang.Object
-
- com.codahale.metrics.health.HealthCheck
-
- org.kiwiproject.dropwizard.metrics.health.TimeBasedDirectoryCleanerHealthCheck
-
public class TimeBasedDirectoryCleanerHealthCheck extends com.codahale.metrics.health.HealthCheckA health check forTimeBasedDirectoryCleanerthat 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.
-
-
Field Summary
Fields Modifier and Type Field Description static DurationDEFAULT_DELETE_ERROR_THRESHOLD
-
Constructor Summary
Constructors Constructor Description TimeBasedDirectoryCleanerHealthCheck(TimeBasedDirectoryCleaner cleaner)Create with specifiedTimeBasedDirectoryCleanerand the default warning threshold.TimeBasedDirectoryCleanerHealthCheck(TimeBasedDirectoryCleaner cleaner, Duration warningThreshold)Create with the specifiedTimeBasedDirectoryCleanerand warning threshold.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.codahale.metrics.health.HealthCheck.Resultcheck()
-
-
-
Field Detail
-
DEFAULT_DELETE_ERROR_THRESHOLD
public static final Duration DEFAULT_DELETE_ERROR_THRESHOLD
-
-
Constructor Detail
-
TimeBasedDirectoryCleanerHealthCheck
public TimeBasedDirectoryCleanerHealthCheck(TimeBasedDirectoryCleaner cleaner)
Create with specifiedTimeBasedDirectoryCleanerand the default warning threshold.- Parameters:
cleaner- the TimeBasedDirectoryCleaner to use- See Also:
DEFAULT_DELETE_ERROR_THRESHOLD
-
TimeBasedDirectoryCleanerHealthCheck
public TimeBasedDirectoryCleanerHealthCheck(TimeBasedDirectoryCleaner cleaner, Duration warningThreshold)
Create with the specifiedTimeBasedDirectoryCleanerand warning threshold.- Parameters:
cleaner- the TimeBasedDirectoryCleaner to usewarningThreshold- the warning threshold
-
-