@Immutable public final class IndexPlan extends Object implements Comparable<IndexPlan>
Modifier and Type | Class and Description |
---|---|
static class |
IndexPlan.StandardIndexPlanner |
Modifier and Type | Field and Description |
---|---|
protected static String |
CHILDREN_BY_PATH_INDEX_NAME |
protected static String |
DESCENDANTS_BY_PATH_INDEX_NAME |
protected static String |
NODE_BY_PATH_INDEX_NAME |
protected static String |
PATH_PARAMETER |
Constructor and Description |
---|
IndexPlan(String name,
String providerName,
Collection<Constraint> constraints,
int costEstimate,
long cardinalityEstimate,
Map<String,Object> parameters) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(IndexPlan that) |
long |
getCardinalityEstimate()
Return an esimate of the number of nodes that will be returned by this index given the constraints.
|
Collection<Constraint> |
getConstraints()
Get the constraints that should be applied to this index if/when it is used.
|
int |
getCostEstimate()
Return an estimate of the cost of using the index for the query in question.
|
String |
getName()
Get the name of this index.
|
Map<String,Object> |
getParameters()
Get the provider-specific parameters for this index usage.
|
String |
getProviderName()
The name of the provider that owns the index.
|
String |
toString() |
protected static final String NODE_BY_PATH_INDEX_NAME
protected static final String CHILDREN_BY_PATH_INDEX_NAME
protected static final String DESCENDANTS_BY_PATH_INDEX_NAME
protected static final String PATH_PARAMETER
public IndexPlan(String name, String providerName, Collection<Constraint> constraints, int costEstimate, long cardinalityEstimate, Map<String,Object> parameters)
public long getCardinalityEstimate()
When possible, the actual cardinality should be used. However, since an accurate number is often expensive or impossible to determine in the planning phase, the cardinality can instead represent a rough order of magnitude.
Indexes with lower costs and lower cardinalities
will be favored over other indexes.
public int getCostEstimate()
QueryIndexProvider
that owns the
index is in a remote process, then the cost estimate will need to take into account the cost of transmitting the request
with the criteria and the response with all of the node that meet the criteria of the index.
Indexes with lower costs and lower cardinalities
will be favored over other indexes.
public String getName()
public String getProviderName()
public Collection<Constraint> getConstraints()
public Map<String,Object> getParameters()
public int compareTo(IndexPlan that)
compareTo
in interface Comparable<IndexPlan>
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.