Package org.apache.derby.catalog.types
Class StatisticsImpl
java.lang.Object
org.apache.derby.catalog.types.StatisticsImpl
- All Implemented Interfaces:
Externalizable
,Serializable
,Statistics
,Formatable
,TypedFormat
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionZero argument constructor for Formatable InterfaceStatisticsImpl
(long numRows, long numUnique) Constructor for StatisticsImpl. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the estimated number of rows in the index.int
Get a universally unique identifier for the type of this object.void
double
selectivity
(Object[] predicates) toString()
void
Write this object to a stream of stored objects.
-
Field Details
-
numRows
private long numRows -
numUnique
private long numUnique
-
-
Constructor Details
-
StatisticsImpl
public StatisticsImpl(long numRows, long numUnique) Constructor for StatisticsImpl.- Parameters:
numRows
- number of rows in the conglomerate for which this statistic is being created.numUnique
- number of unique values in the key for which this statistic is being created.
-
StatisticsImpl
public StatisticsImpl()Zero argument constructor for Formatable Interface
-
-
Method Details
-
getRowEstimate
public long getRowEstimate()Returns the estimated number of rows in the index.- Specified by:
getRowEstimate
in interfaceStatistics
- Returns:
- Number of rows.
-
selectivity
- Specified by:
selectivity
in interfaceStatistics
- Returns:
- the selectivity for a set of predicates.
- See Also:
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
- See Also:
-
writeExternal
Write this object to a stream of stored objects.- Specified by:
writeExternal
in interfaceExternalizable
- Parameters:
out
- write bytes here.- Throws:
IOException
- thrown on error
-
getTypeFormatId
public int getTypeFormatId()Description copied from interface:TypedFormat
Get a universally unique identifier for the type of this object.- Specified by:
getTypeFormatId
in interfaceTypedFormat
- Returns:
- the format id which corresponds to this class.
-
toString
-