Package org.apache.derby.catalog.types
Class StatisticsImpl
- java.lang.Object
-
- org.apache.derby.catalog.types.StatisticsImpl
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,Statistics,Formatable,TypedFormat
public class StatisticsImpl extends java.lang.Object implements Statistics, Formatable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StatisticsImpl()Zero argument constructor for Formatable InterfaceStatisticsImpl(long numRows, long numUnique)Constructor for StatisticsImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetRowEstimate()Returns the estimated number of rows in the index.intgetTypeFormatId()Get a universally unique identifier for the type of this object.voidreadExternal(java.io.ObjectInput in)doubleselectivity(java.lang.Object[] predicates)java.lang.StringtoString()voidwriteExternal(java.io.ObjectOutput out)Write this object to a stream of stored objects.
-
-
-
Constructor Detail
-
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 Detail
-
getRowEstimate
public long getRowEstimate()
Returns the estimated number of rows in the index.- Specified by:
getRowEstimatein interfaceStatistics- Returns:
- Number of rows.
-
selectivity
public double selectivity(java.lang.Object[] predicates)
- Specified by:
selectivityin interfaceStatistics- Returns:
- the selectivity for a set of predicates.
- See Also:
Statistics.selectivity(java.lang.Object[])
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException- See Also:
Externalizable.readExternal(java.io.ObjectInput)
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionWrite this object to a stream of stored objects.- Specified by:
writeExternalin interfacejava.io.Externalizable- Parameters:
out- write bytes here.- Throws:
java.io.IOException- thrown on error
-
getTypeFormatId
public int getTypeFormatId()
Description copied from interface:TypedFormatGet a universally unique identifier for the type of this object.- Specified by:
getTypeFormatIdin interfaceTypedFormat- Returns:
- the format id which corresponds to this class.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
-