![JAR search and dependency download from the Maven repository](/logo.png)
io.github.mfvanek.pg.statistics.StatisticsAware Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pg-index-health-core Show documentation
Show all versions of pg-index-health-core Show documentation
pg-index-health-core is a Java library for analyzing and maintaining indexes and tables health in PostgreSQL databases on a specific host.
/*
* Copyright (c) 2019-2024. Ivan Vakhrushev and others.
* https://github.com/mfvanek/pg-index-health
*
* This file is a part of "pg-index-health" - a Java library for
* analyzing and maintaining indexes health in PostgreSQL databases.
*
* Licensed under the Apache License 2.0
*/
package io.github.mfvanek.pg.statistics;
import java.time.OffsetDateTime;
import java.util.Optional;
import javax.annotation.Nonnull;
/**
* A set of methods to manage statistics.
*
* @author Ivan Vakhrushev
*/
public interface StatisticsAware {
/**
* Resets all statistics counters for the current database to zero.
*
* Note: superuser privileges are required.
*
* @return true if the operation is successful
* @see Monitoring Database Activity
*/
boolean resetStatistics();
/**
* Gets time at which database statistics were last reset.
*
* @return {@code Optional} of null or time at which database statistics were last reset.
*/
@Nonnull
Optional getLastStatsResetTimestamp();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy