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 long
getRowEstimate()
Returns the estimated number of rows in the index.int
getTypeFormatId()
Get a universally unique identifier for the type of this object.void
readExternal(java.io.ObjectInput in)
double
selectivity(java.lang.Object[] predicates)
java.lang.String
toString()
void
writeExternal(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:
getRowEstimate
in interfaceStatistics
- Returns:
- Number of rows.
-
selectivity
public double selectivity(java.lang.Object[] predicates)
- Specified by:
selectivity
in 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:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
- See Also:
Externalizable.readExternal(java.io.ObjectInput)
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
Write this object to a stream of stored objects.- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Parameters:
out
- write bytes here.- Throws:
java.io.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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-