Package io.github.mfvanek.pg.model.index
Class IndexWithBloat
java.lang.Object
io.github.mfvanek.pg.model.index.Index
io.github.mfvanek.pg.model.index.IndexWithSize
io.github.mfvanek.pg.model.index.IndexWithBloat
- All Implemented Interfaces:
BloatAware
,DbObject
,IndexBloatAware
,IndexNameAware
,IndexSizeAware
,TableNameAware
,Comparable<Index>
Represents database index with information about bloat.
-
Method Summary
Modifier and TypeMethodDescriptionint
Gets bloat percentage (in the range from 0 to 100 inclusive).long
Gets bloat amount in bytes.protected String
static IndexWithBloat
of
(String tableName, String indexName, long indexSizeInBytes, long bloatSizeInBytes, int bloatPercentage) Constructs aIndexWithBloat
object.toString()
Methods inherited from class io.github.mfvanek.pg.model.index.IndexWithSize
getIndexSizeInBytes, of
Methods inherited from class io.github.mfvanek.pg.model.index.Index
compareTo, equals, getIndexName, getName, getTableName, hashCode, of
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.mfvanek.pg.model.index.IndexNameAware
getIndexName
Methods inherited from interface io.github.mfvanek.pg.model.index.IndexSizeAware
getIndexSizeInBytes
-
Method Details
-
getBloatSizeInBytes
public long getBloatSizeInBytes()Gets bloat amount in bytes.- Specified by:
getBloatSizeInBytes
in interfaceBloatAware
- Returns:
- bloat amount
-
getBloatPercentage
public int getBloatPercentage()Gets bloat percentage (in the range from 0 to 100 inclusive).- Specified by:
getBloatPercentage
in interfaceBloatAware
- Returns:
- bloat percentage
-
innerToString
- Overrides:
innerToString
in classIndexWithSize
-
toString
- Overrides:
toString
in classIndexWithSize
-
of
@Nonnull public static IndexWithBloat of(@Nonnull String tableName, @Nonnull String indexName, long indexSizeInBytes, long bloatSizeInBytes, int bloatPercentage) Constructs aIndexWithBloat
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
-