@Immutable public final class IndexPlan extends Object implements Comparable<IndexPlan>
Constructor and Description |
---|
IndexPlan(String name,
String workspaceName,
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 |
getWorkspaceName()
Get the name of the workspace to which this index applies.
|
String |
toString() |
public IndexPlan(String name, String workspaceName, 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()
IndexProvider
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 getWorkspaceName()
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.