Class FolderAccessibleCheck
java.lang.Object
com.codahale.metrics.health.HealthCheck
com.peterphi.std.guice.metrics.health.AbstractHealthCheck
com.peterphi.std.guice.metrics.health.FolderAccessibleCheck
- All Implemented Interfaces:
GuiceLifecycleListener
A health determine if a given folder can be read/written
-
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected com.codahale.metrics.health.HealthCheck.Result
check()
protected abstract boolean
If true, a permissions based check check will be performed to see if this application can write to the folderprotected abstract boolean
If true, the ability to write to the folder will be check by actually performing a file write (the written file is then deleted)protected abstract String
getPath()
The path to the folder concernedMethods inherited from class com.peterphi.std.guice.metrics.health.AbstractHealthCheck
enabled, getHealthImplication, getName, postConstruct
Methods inherited from class com.codahale.metrics.health.HealthCheck
clock, execute
-
Constructor Details
-
FolderAccessibleCheck
public FolderAccessibleCheck()
-
-
Method Details
-
check
- Specified by:
check
in classcom.codahale.metrics.health.HealthCheck
- Throws:
Exception
-
getPath
The path to the folder concerned- Returns:
-
doWriteCheck
protected abstract boolean doWriteCheck()If true, a permissions based check check will be performed to see if this application can write to the folder- Returns:
-
doWriteTest
protected abstract boolean doWriteTest()If true, the ability to write to the folder will be check by actually performing a file write (the written file is then deleted)- Returns:
-