All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.mfvanek.pg.statistics.StatisticsAware Maven / Gradle / Ivy

Go to download

pg-index-health-core is a Java library for analyzing and maintaining indexes and tables health in PostgreSQL databases on a specific host.

There is a newer version: 0.14.4
Show newest version
/*
 * 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