Class IndexWithBloat

All Implemented Interfaces:
BloatAware, DbObject, IndexBloatAware, IndexNameAware, IndexSizeAware, TableNameAware, Comparable<Index>

@Immutable public class IndexWithBloat extends IndexWithSize implements IndexBloatAware
Represents database index with information about bloat.
  • Method Details

    • getBloatSizeInBytes

      public long getBloatSizeInBytes()
      Gets bloat amount in bytes.
      Specified by:
      getBloatSizeInBytes in interface BloatAware
      Returns:
      bloat amount
    • getBloatPercentage

      public int getBloatPercentage()
      Gets bloat percentage (in the range from 0 to 100 inclusive).
      Specified by:
      getBloatPercentage in interface BloatAware
      Returns:
      bloat percentage
    • innerToString

      protected String innerToString()
      Overrides:
      innerToString in class IndexWithSize
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class IndexWithSize
    • of

      @Nonnull public static IndexWithBloat of(@Nonnull String tableName, @Nonnull String indexName, long indexSizeInBytes, long bloatSizeInBytes, int bloatPercentage)
      Constructs a IndexWithBloat object.
      Parameters:
      tableName - table name; should be non blank.
      indexName - index name; should be non blank.
      indexSizeInBytes - index size in bytes; should be positive or zero.
      bloatSizeInBytes - bloat amount in bytes; should be positive or zero.
      bloatPercentage - bloat percentage in the range from 0 to 100 inclusive.
      Returns:
      IndexWithBloat