Interface StatisticsMaintenanceOnHost

All Superinterfaces:
HostAware, StatisticsAware
All Known Implementing Classes:
StatisticsMaintenanceOnHostImpl

public interface StatisticsMaintenanceOnHost extends StatisticsAware, HostAware
An entry point for managing statistics on the specified host.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets time at which database statistics were last reset on current host.
    boolean
    Resets all statistics counters for the current database on current host to zero.

    Methods inherited from interface io.github.mfvanek.pg.connection.HostAware

    getHost
  • Method Details

    • resetStatistics

      boolean resetStatistics()
      Resets all statistics counters for the current database on current host to zero.

      Note: superuser privileges are required.

      Specified by:
      resetStatistics in interface StatisticsAware
      Returns:
      true if the operation is successful
      See Also:
    • getLastStatsResetTimestamp

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