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

public abstract class FolderAccessibleCheck extends AbstractHealthCheck
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.codahale.metrics.health.HealthCheck.Result
     
    protected abstract boolean
    If true, a permissions based check check will be performed to see if this application can write to the folder
    protected 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
    The path to the folder concerned

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FolderAccessibleCheck

      public FolderAccessibleCheck()
  • Method Details

    • check

      protected com.codahale.metrics.health.HealthCheck.Result check() throws Exception
      Specified by:
      check in class com.codahale.metrics.health.HealthCheck
      Throws:
      Exception
    • getPath

      protected abstract String 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: