Package com.tangosol.util
Class SimpleQueryRecord.PartialResult.Step
java.lang.Object
com.tangosol.util.SimpleQueryRecord.PartialResult.Step
- All Implemented Interfaces:
ExternalizableLite,PortableObject,QueryRecord.PartialResult.Step,Serializable
- Direct Known Subclasses:
SimpleQueryRecord.PartialResult.AbstractRecordableStep
- Enclosing class:
SimpleQueryRecord.PartialResult
public static class SimpleQueryRecord.PartialResult.Step
extends Object
implements QueryRecord.PartialResult.Step, ExternalizableLite, PortableObject
Simple QueryRecord.PartialResult.Step implementation.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longThe execution time in milliseconds.protected List<SimpleQueryRecord.PartialResult.Step> The list of child steps.protected intThe estimated cost.protected intThe pre-execution key set size.protected intThe post-execution key set size.The set of index lookup records.protected StringThe filter description. -
Constructor Summary
ConstructorsConstructorDescriptionStep()Default constructor (necessary for the ExternalizableLite interface).Construct a step.Copy constructor for a Step. -
Method Summary
Modifier and TypeMethodDescriptionlongGet the amount of time (in ms) spent evaluating the filter or applying an index for this query plan step.intGet the calculated cost of applying the filter as defined bycalculateEffectivenessGet a description of the filter that was associated with this step during its creation.Set<? extends QueryRecord.PartialResult.IndexLookupRecord> Get the recorded information about the index lookups performed during filter evaluation as part of a query record.intGet the size of the key set remaining after evaluating the filter or applying an index.intGet the size of the key set prior to evaluating the filter or applying an index.List<? extends QueryRecord.PartialResult.Step> getSteps()Return inner nested steps, may be null if not nested.protected booleanDetermine whether or not the given step is capable of being placed in one-to-one correspondence with this step.protected voidMerge the given step with this one.voidRestore the contents of a user type instance by reading its state using the specified PofReader object.voidRestore the contents of this object by loading the object's state from the passed DataInput object.voidwriteExternal(PofWriter out) Save the contents of a POF user type instance by writing its state using the specified PofWriter object.voidwriteExternal(DataOutput out) Save the contents of this object by storing the object's state into the passed DataOutput object.
-
Field Details
-
m_sFilter
The filter description. -
m_nEfficiency
protected int m_nEfficiencyThe estimated cost. -
m_nSizeIn
protected int m_nSizeInThe pre-execution key set size. -
m_nSizeOut
protected int m_nSizeOutThe post-execution key set size. -
m_cMillis
protected long m_cMillisThe execution time in milliseconds. -
m_setIndexLookupRecords
The set of index lookup records. -
m_listSubSteps
The list of child steps.
-
-
Constructor Details
-
Step
public Step()Default constructor (necessary for the ExternalizableLite interface). -
Step
Construct a step.- Parameters:
filter- the filter
-
Step
Copy constructor for a Step.- Parameters:
step- the step to copy
-
-
Method Details
-
getSteps
Return inner nested steps, may be null if not nested.- Specified by:
getStepsin interfaceQueryRecord.PartialResult.Step- Returns:
- the inner nested steps in the order they are applied
-
getFilterDescription
Get a description of the filter that was associated with this step during its creation.- Specified by:
getFilterDescriptionin interfaceQueryRecord.PartialResult.Step- Returns:
- the description of the filter
-
getIndexLookupRecords
Get the recorded information about the index lookups performed during filter evaluation as part of a query record.- Specified by:
getIndexLookupRecordsin interfaceQueryRecord.PartialResult.Step- Returns:
- a set of
QueryRecord.PartialResult.IndexLookupRecord
-
getEfficiency
public int getEfficiency()Get the calculated cost of applying the filter as defined bycalculateEffectiveness- Specified by:
getEfficiencyin interfaceQueryRecord.PartialResult.Step- Returns:
- an effectiveness estimate of how well the associated filter can use any applicable index
-
getPreFilterKeySetSize
public int getPreFilterKeySetSize()Get the size of the key set prior to evaluating the filter or applying an index. This value can be used together withQueryRecord.PartialResult.Step.getPostFilterKeySetSize()to calculate an actual effectiveness (reduction of the key set) for this filter step.- Specified by:
getPreFilterKeySetSizein interfaceQueryRecord.PartialResult.Step- Returns:
- the size of the key set prior to evaluating the filter or applying an index
-
getPostFilterKeySetSize
public int getPostFilterKeySetSize()Get the size of the key set remaining after evaluating the filter or applying an index. This value can be used together withQueryRecord.PartialResult.Step.getPreFilterKeySetSize()to calculate an actual effectiveness (reduction of the key set) for this filter step.- Specified by:
getPostFilterKeySetSizein interfaceQueryRecord.PartialResult.Step- Returns:
- the size of the key set after evaluating the filter or applying an index
-
getDuration
public long getDuration()Get the amount of time (in ms) spent evaluating the filter or applying an index for this query plan step.- Specified by:
getDurationin interfaceQueryRecord.PartialResult.Step- Returns:
- the number of milliseconds spent evaluating the filter
-
isMatching
Determine whether or not the given step is capable of being placed in one-to-one correspondence with this step. Steps are defined to be matching if both steps have equivalent name, index lookup records and owned lists of sub-steps.- Parameters:
step- the step to check- Returns:
- true iff the given step matches with this step
-
merge
Merge the given step with this one. This method assumes that the given step matches with this one.- Parameters:
step- the step to merge
-
readExternal
Restore the contents of this object by loading the object's state from the passed DataInput object.- Specified by:
readExternalin interfaceExternalizableLite- Parameters:
in- the DataInput stream to read data from in order to restore the state of this object- Throws:
IOException- if an I/O exception occurs
-
writeExternal
Save the contents of this object by storing the object's state into the passed DataOutput object.- Specified by:
writeExternalin interfaceExternalizableLite- Parameters:
out- the DataOutput stream to write the state of this object to- Throws:
IOException- if an I/O exception occurs
-
readExternal
Restore the contents of a user type instance by reading its state using the specified PofReader object.- Specified by:
readExternalin interfacePortableObject- Parameters:
in- the PofReader from which to read the object's state- Throws:
IOException- if an I/O error occurs
-
writeExternal
Save the contents of a POF user type instance by writing its state using the specified PofWriter object.- Specified by:
writeExternalin interfacePortableObject- Parameters:
out- the PofWriter to which to write the object's state- Throws:
IOException- if an I/O error occurs
-