Class AccessPathImpl
- java.lang.Object
-
- org.apache.derby.impl.sql.compile.AccessPathImpl
-
- All Implemented Interfaces:
AccessPath
class AccessPathImpl extends java.lang.Object implements AccessPath
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
accessPathName
(package private) ConglomerateDescriptor
cd
private CostEstimate
costEstimate
(package private) boolean
coveringIndexScan
(package private) JoinStrategy
joinStrategy
(package private) int
lockMode
(package private) boolean
nonMatchingIndexScan
(package private) Optimizer
optimizer
-
Constructor Summary
Constructors Constructor Description AccessPathImpl(Optimizer optimizer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copy(AccessPath copyFrom)
Copy all information from the given AccessPath to this one.ConglomerateDescriptor
getConglomerateDescriptor()
Get whatever was last set as the conglomerate descriptor.CostEstimate
getCostEstimate()
Get the cost estimate for this AccessPath.boolean
getCoveringIndexScan()
Return whether or not the optimizer is considering a covering index scan on this AccessPath.JoinStrategy
getJoinStrategy()
Get the join strategy, as set by setJoinStrategy().int
getLockMode()
Get the lock mode, as last set in setLockMode().boolean
getNonMatchingIndexScan()
Return whether or not the optimizer is considering a non-matching index scan on this AccessPath.Optimizer
getOptimizer()
Get the optimizer associated with this access path.void
initializeAccessPathName(DataDictionary dd, TableDescriptor td)
Sets the "name" of the access path. if the access path represents an index then set the name to the name of the index. if it is an index created for a constraint, use the constraint name.void
setConglomerateDescriptor(ConglomerateDescriptor cd)
Set the conglomerate descriptor for this access path.void
setCostEstimate(CostEstimate costEstimate)
Set the given cost estimate in this AccessPath.void
setCoveringIndexScan(boolean coveringIndexScan)
Set whether or not to consider a covering index scan on the optimizable.void
setJoinStrategy(JoinStrategy joinStrategy)
Remember the given join strategyvoid
setLockMode(int lockMode)
Set the lock modevoid
setNonMatchingIndexScan(boolean nonMatchingIndexScan)
Set whether or not to consider a non-matching index scan on this AccessPath.java.lang.String
toString()
-
-
-
Field Detail
-
cd
ConglomerateDescriptor cd
-
costEstimate
private CostEstimate costEstimate
-
coveringIndexScan
boolean coveringIndexScan
-
nonMatchingIndexScan
boolean nonMatchingIndexScan
-
joinStrategy
JoinStrategy joinStrategy
-
lockMode
int lockMode
-
optimizer
Optimizer optimizer
-
accessPathName
private java.lang.String accessPathName
-
-
Constructor Detail
-
AccessPathImpl
AccessPathImpl(Optimizer optimizer)
-
-
Method Detail
-
setConglomerateDescriptor
public void setConglomerateDescriptor(ConglomerateDescriptor cd)
Description copied from interface:AccessPath
Set the conglomerate descriptor for this access path.- Specified by:
setConglomerateDescriptor
in interfaceAccessPath
- Parameters:
cd
- A ConglomerateDescriptor- See Also:
AccessPath.setConglomerateDescriptor(org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor)
-
getConglomerateDescriptor
public ConglomerateDescriptor getConglomerateDescriptor()
Description copied from interface:AccessPath
Get whatever was last set as the conglomerate descriptor. Returns null if nothing was set since the last call to startOptimizing()- Specified by:
getConglomerateDescriptor
in interfaceAccessPath
- See Also:
AccessPath.getConglomerateDescriptor()
-
setCostEstimate
public void setCostEstimate(CostEstimate costEstimate)
Description copied from interface:AccessPath
Set the given cost estimate in this AccessPath. Generally, this will be the CostEstimate for the plan currently under consideration.- Specified by:
setCostEstimate
in interfaceAccessPath
- See Also:
AccessPath.setCostEstimate(org.apache.derby.iapi.sql.compile.CostEstimate)
-
getCostEstimate
public CostEstimate getCostEstimate()
Description copied from interface:AccessPath
Get the cost estimate for this AccessPath. This is the last one set by setCostEstimate.- Specified by:
getCostEstimate
in interfaceAccessPath
- See Also:
AccessPath.getCostEstimate()
-
setCoveringIndexScan
public void setCoveringIndexScan(boolean coveringIndexScan)
Description copied from interface:AccessPath
Set whether or not to consider a covering index scan on the optimizable.- Specified by:
setCoveringIndexScan
in interfaceAccessPath
- See Also:
AccessPath.setCoveringIndexScan(boolean)
-
getCoveringIndexScan
public boolean getCoveringIndexScan()
Description copied from interface:AccessPath
Return whether or not the optimizer is considering a covering index scan on this AccessPath.- Specified by:
getCoveringIndexScan
in interfaceAccessPath
- Returns:
- boolean Whether or not the optimizer chose a covering index scan.
- See Also:
AccessPath.getCoveringIndexScan()
-
setNonMatchingIndexScan
public void setNonMatchingIndexScan(boolean nonMatchingIndexScan)
Description copied from interface:AccessPath
Set whether or not to consider a non-matching index scan on this AccessPath.- Specified by:
setNonMatchingIndexScan
in interfaceAccessPath
- See Also:
AccessPath.setNonMatchingIndexScan(boolean)
-
getNonMatchingIndexScan
public boolean getNonMatchingIndexScan()
Description copied from interface:AccessPath
Return whether or not the optimizer is considering a non-matching index scan on this AccessPath. We expect to call this during generation, after access path selection is complete.- Specified by:
getNonMatchingIndexScan
in interfaceAccessPath
- Returns:
- boolean Whether or not the optimizer is considering a non-matching index scan.
- See Also:
AccessPath.getNonMatchingIndexScan()
-
setJoinStrategy
public void setJoinStrategy(JoinStrategy joinStrategy)
Description copied from interface:AccessPath
Remember the given join strategy- Specified by:
setJoinStrategy
in interfaceAccessPath
- Parameters:
joinStrategy
- The best join strategy- See Also:
AccessPath.setJoinStrategy(org.apache.derby.iapi.sql.compile.JoinStrategy)
-
getJoinStrategy
public JoinStrategy getJoinStrategy()
Description copied from interface:AccessPath
Get the join strategy, as set by setJoinStrategy().- Specified by:
getJoinStrategy
in interfaceAccessPath
- See Also:
AccessPath.getJoinStrategy()
-
setLockMode
public void setLockMode(int lockMode)
Description copied from interface:AccessPath
Set the lock mode- Specified by:
setLockMode
in interfaceAccessPath
- See Also:
AccessPath.setLockMode(int)
-
getLockMode
public int getLockMode()
Description copied from interface:AccessPath
Get the lock mode, as last set in setLockMode().- Specified by:
getLockMode
in interfaceAccessPath
- See Also:
AccessPath.getLockMode()
-
copy
public void copy(AccessPath copyFrom)
Description copied from interface:AccessPath
Copy all information from the given AccessPath to this one.- Specified by:
copy
in interfaceAccessPath
- See Also:
AccessPath.copy(org.apache.derby.iapi.sql.compile.AccessPath)
-
getOptimizer
public Optimizer getOptimizer()
Description copied from interface:AccessPath
Get the optimizer associated with this access path.- Specified by:
getOptimizer
in interfaceAccessPath
- Returns:
- The optimizer associated with this access path.
- See Also:
AccessPath.getOptimizer()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
initializeAccessPathName
public void initializeAccessPathName(DataDictionary dd, TableDescriptor td) throws StandardException
Description copied from interface:AccessPath
Sets the "name" of the access path. if the access path represents an index then set the name to the name of the index. if it is an index created for a constraint, use the constraint name. This is called only for base tables.- Specified by:
initializeAccessPathName
in interfaceAccessPath
- Parameters:
dd
- Datadictionary.td
- TableDescriptor of the base table.- Throws:
StandardException
- on error.- See Also:
AccessPath.initializeAccessPathName(org.apache.derby.iapi.sql.dictionary.DataDictionary, org.apache.derby.iapi.sql.dictionary.TableDescriptor)
-
-