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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.codahale.metrics.health.HealthCheck.Resultcheck()protected abstract booleanIf true, a permissions based check check will be performed to see if this application can write to the folderprotected abstract booleanIf 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 StringgetPath()The path to the folder concernedMethods inherited from class com.peterphi.std.guice.metrics.health.AbstractHealthCheck
enabled, getHealthImplication, getName, postConstructMethods inherited from class com.codahale.metrics.health.HealthCheck
clock, execute
-
Constructor Details
-
FolderAccessibleCheck
public FolderAccessibleCheck()
-
-
Method Details
-
check
- Specified by:
checkin 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:
-