Class TablesWithBloatCheckOnHost

java.lang.Object
io.github.mfvanek.pg.checks.host.TablesWithBloatCheckOnHost
All Implemented Interfaces:
DatabaseCheckOnHost<io.github.mfvanek.pg.model.table.TableWithBloat>, DiagnosticAware, RawTypeAware<io.github.mfvanek.pg.model.table.TableWithBloat>, io.github.mfvanek.pg.connection.HostAware

public class TablesWithBloatCheckOnHost extends Object
Check for tables bloat on a specific host.
Since:
0.6.0
  • Field Details

  • Constructor Details

    • TablesWithBloatCheckOnHost

      public TablesWithBloatCheckOnHost(@Nonnull io.github.mfvanek.pg.connection.PgConnection pgConnection)
  • Method Details

    • check

      @Nonnull public List<io.github.mfvanek.pg.model.table.TableWithBloat> check(@Nonnull io.github.mfvanek.pg.model.PgContext pgContext)
      Returns tables that are bloated in the specified schema.

      Note: The database user on whose behalf this method will be executed have to have read permissions for the corresponding tables.

      Parameters:
      pgContext - check's context with the specified schema
      Returns:
      list of bloated tables
      See Also:
      • PgContext
    • getType

      @Nonnull public Class<io.github.mfvanek.pg.model.table.TableWithBloat> getType()
      Gets original java type.
      Specified by:
      getType in interface RawTypeAware<T extends io.github.mfvanek.pg.model.DbObject>
      Returns:
      java type representing database object
    • getDiagnostic

      @Nonnull public Diagnostic getDiagnostic()
      Gets the diagnostic - a rule related to the check.
      Specified by:
      getDiagnostic in interface DiagnosticAware
      Returns:
      diagnostic
      See Also:
    • getHost

      @Nonnull public io.github.mfvanek.pg.connection.PgHost getHost()
      Specified by:
      getHost in interface io.github.mfvanek.pg.connection.HostAware
    • executeQuery

      @Nonnull protected List<io.github.mfvanek.pg.model.table.TableWithBloat> executeQuery(@Nonnull io.github.mfvanek.pg.model.PgContext pgContext, @Nonnull ResultSetExtractor<io.github.mfvanek.pg.model.table.TableWithBloat> rse)