Interface DatabaseManagement

All Superinterfaces:
io.github.mfvanek.pg.settings.ConfigurationAware, io.github.mfvanek.pg.statistics.StatisticsAware
All Known Implementing Classes:
DatabaseManagementImpl

public interface DatabaseManagement extends io.github.mfvanek.pg.statistics.StatisticsAware, io.github.mfvanek.pg.settings.ConfigurationAware
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets time at which database statistics were last reset on the primary host.
    boolean
    Reset all statistics counters on all hosts in the cluster to zero.

    Methods inherited from interface io.github.mfvanek.pg.settings.ConfigurationAware

    getParamsCurrentValues, getParamsWithDefaultValues
  • Method Details

    • resetStatistics

      boolean resetStatistics()
      Reset all statistics counters on all hosts in the cluster to zero.

      It is safe running this method on your database. It just reset counters without any impact on performance.

      Specified by:
      resetStatistics in interface io.github.mfvanek.pg.statistics.StatisticsAware
      Returns:
      true if the operation is successful
      See Also:
      • StatisticsMaintenanceOnHost
    • getLastStatsResetTimestamp

      @Nonnull Optional<OffsetDateTime> getLastStatsResetTimestamp()
      Gets time at which database statistics were last reset on the primary host.
      Specified by:
      getLastStatsResetTimestamp in interface io.github.mfvanek.pg.statistics.StatisticsAware
      Returns:
      Optional of null or time at which database statistics were last reset.