Class FHIRDbSizeModel
- java.lang.Object
-
- org.linuxforhealth.fhir.schema.size.FHIRDbSizeModel
-
public class FHIRDbSizeModel extends java.lang.Object
A model used to collect the reported size of various elements in the FHIR data schema. The model allows reports to be generated showing usage group by various dimensions and with different output formats
-
-
Constructor Summary
Constructors Constructor Description FHIRDbSizeModel(java.lang.String schemaName)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(FHIRDbSizeModelVisitor visitor)
Traverse the elements of this model using the given visitorvoid
accumulateIndexSize(java.lang.String resourceType, java.lang.String tableName, boolean isParamTable, java.lang.String indexName, long size)
Accumulate the resource size for the given table indexvoid
accumulateTableSize(java.lang.String resourceType, java.lang.String tableName, boolean isParamTable, long tableSize, long rowEstimate)
Accumulate the resource size for the given tablejava.lang.String
getSchemaName()
Getter for the schema namelong
getTotalIndexSize()
Get the total size of all indexeslong
getTotalSize()
Get the total size of the databaselong
getTotalTableSize()
Get the total size of all tables, excluding indexes
-
-
-
Method Detail
-
getSchemaName
public java.lang.String getSchemaName()
Getter for the schema name- Returns:
-
accumulateTableSize
public void accumulateTableSize(java.lang.String resourceType, java.lang.String tableName, boolean isParamTable, long tableSize, long rowEstimate)
Accumulate the resource size for the given table- Parameters:
resourceType
-tableName
-isParamTable
-tableSize
-rowEstimate
-
-
accumulateIndexSize
public void accumulateIndexSize(java.lang.String resourceType, java.lang.String tableName, boolean isParamTable, java.lang.String indexName, long size)
Accumulate the resource size for the given table index- Parameters:
resourceType
-tableName
-isParamTable
-indexName
-size
-
-
getTotalSize
public long getTotalSize()
Get the total size of the database- Returns:
-
getTotalTableSize
public long getTotalTableSize()
Get the total size of all tables, excluding indexes- Returns:
-
getTotalIndexSize
public long getTotalIndexSize()
Get the total size of all indexes- Returns:
-
accept
public void accept(FHIRDbSizeModelVisitor visitor)
Traverse the elements of this model using the given visitor- Parameters:
visitor
-
-
-