Class AbstractHealthLogger

java.lang.Object
io.github.mfvanek.pg.common.health.logger.AbstractHealthLogger
All Implemented Interfaces:
HealthLogger
Direct Known Subclasses:
KeyValueFileHealthLogger, StandardHealthLogger

public abstract class AbstractHealthLogger extends Object implements HealthLogger
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractHealthLogger(io.github.mfvanek.pg.connection.ConnectionCredentials credentials, io.github.mfvanek.pg.connection.HighAvailabilityPgConnectionFactory connectionFactory, Function<io.github.mfvanek.pg.connection.HighAvailabilityPgConnection,DatabaseChecks> databaseChecksFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final List<String>
    logAll(Exclusions exclusions, io.github.mfvanek.pg.model.PgContext pgContext)
    Logs indexes and tables health with given exclusions in given schema.
    protected abstract String
    writeToLog(LoggingKey key, int value)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.github.mfvanek.pg.common.health.logger.HealthLogger

    logAll
  • Constructor Details

    • AbstractHealthLogger

      protected AbstractHealthLogger(@Nonnull io.github.mfvanek.pg.connection.ConnectionCredentials credentials, @Nonnull io.github.mfvanek.pg.connection.HighAvailabilityPgConnectionFactory connectionFactory, @Nonnull Function<io.github.mfvanek.pg.connection.HighAvailabilityPgConnection,DatabaseChecks> databaseChecksFactory)
  • Method Details

    • logAll

      @Nonnull public final List<String> logAll(@Nonnull Exclusions exclusions, @Nonnull io.github.mfvanek.pg.model.PgContext pgContext)
      Logs indexes and tables health with given exclusions in given schema.
      Specified by:
      logAll in interface HealthLogger
      Parameters:
      exclusions - Exclusions
      pgContext - PgContext
      Returns:
      results of logging health indexes
    • writeToLog

      protected abstract String writeToLog(@Nonnull LoggingKey key, int value)