Interface HealthCheck


public interface HealthCheck
  • Method Summary

    Modifier and Type
    Method
    Description
     
    check(Path pathToVault, VaultConfig config, org.cryptomator.cryptolib.api.Masterkey masterkey, org.cryptomator.cryptolib.api.Cryptor cryptor, ExecutorService executor)
    Invokes the health check on a background thread scheduled using the given executor service.
    void
    check(Path pathToVault, VaultConfig config, org.cryptomator.cryptolib.api.Masterkey masterkey, org.cryptomator.cryptolib.api.Cryptor cryptor, Consumer<DiagnosticResult> resultCollector)
    Checks the vault at the given path.
    default String
     
  • Method Details

    • allChecks

      static Collection<HealthCheck> allChecks()
      Returns:
      All known health checks
    • name

      default String name()
      Returns:
      A human-readable name for this check
    • check

      void check(Path pathToVault, VaultConfig config, org.cryptomator.cryptolib.api.Masterkey masterkey, org.cryptomator.cryptolib.api.Cryptor cryptor, Consumer<DiagnosticResult> resultCollector)
      Checks the vault at the given path.
      Parameters:
      pathToVault - Path to the vault's root directory
      config - The parsed and verified vault config
      masterkey - The masterkey
      cryptor - A cryptor initialized for this vault
      resultCollector - Callback called for each result.
    • check

      default Stream<DiagnosticResult> check(Path pathToVault, VaultConfig config, org.cryptomator.cryptolib.api.Masterkey masterkey, org.cryptomator.cryptolib.api.Cryptor cryptor, ExecutorService executor)
      Invokes the health check on a background thread scheduled using the given executor service. The results will be streamed. If the stream gets closed before it terminates, an attempt is made to cancel the health check.

      The check blocks if the stream is not consumed

      Parameters:
      pathToVault - Path to the vault's root directory
      config - The parsed and verified vault config
      masterkey - The masterkey
      cryptor - A cryptor initialized for this vault
      executor - An executor service to run the health check
      Returns:
      A lazily filled stream of diagnostic results.