Class RedisHealthCheck

java.lang.Object
org.gcube.informationsystem.resourceregistry.health.RedisHealthCheck
All Implemented Interfaces:
org.gcube.common.health.api.HealthCheck

public class RedisHealthCheck extends Object implements org.gcube.common.health.api.HealthCheck
Readiness of Redis: the service is degraded when Redis is not reachable, since the caches and the cluster events fall back to the database and every operation still runs.
Author:
Luca Frosini (ISTI - CNR)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The name of the check in the health report.
    static final String
    The reason given when Redis is not reachable.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.gcube.common.health.api.response.HealthCheckResponse
    Reads the state of the Redis connection, which a background thread checks and establishes again: it never waits for Redis.
     

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • RedisHealthCheck

      public RedisHealthCheck()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface org.gcube.common.health.api.HealthCheck
    • check

      public org.gcube.common.health.api.response.HealthCheckResponse check()
      Reads the state of the Redis connection, which a background thread checks and establishes again: it never waits for Redis.
      Specified by:
      check in interface org.gcube.common.health.api.HealthCheck
      Returns:
      up when the connection is open, degraded with the reason otherwise