Class AggregateIndexPlan
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.index.aggregate.AggregateIndexPlan
-
- All Implemented Interfaces:
java.lang.Cloneable
,QueryIndex.IndexPlan
public class AggregateIndexPlan extends java.lang.Object implements QueryIndex.IndexPlan
An index plan for multiple query indexes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.spi.query.QueryIndex.IndexPlan
QueryIndex.IndexPlan.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryIndex.IndexPlan
copy()
Creates a cloned copy of current plan.@Nullable java.lang.Object
getAttribute(java.lang.String name)
Returns the value of the named attribute as anObject
, ornull
if no attribute of the given name exists.double
getCostPerEntry()
The cost to read one entry from the cursor.double
getCostPerExecution()
The cost to execute the query once.NodeState
getDefinition()
The node state with the index definition.long
getEstimatedEntryCount()
The estimated number of entries in the cursor that is returned by the query method, when using this plan.Filter
getFilter()
The filter to use.java.lang.String
getPathPrefix()
The path prefix for this index plan.java.lang.String
getPlanName()
Get the unique plan name.@Nullable Filter.PropertyRestriction
getPropertyRestriction()
The property restriction for this index plan ornull
if this index plan isn't base on a property restriction.java.util.List<QueryIndex.OrderEntry>
getSortOrder()
An aggregated query can not sort, as it gets results from a number of indexes.boolean
getSupportsPathRestriction()
Whether index for this plan supports handling path restrictions natively.boolean
includesNodeData()
Whether all base plan include node data.boolean
isDelayed()
Whether any base plan is delayed.boolean
isDeprecated()
Whether the index is deprecated.boolean
isFulltextIndex()
Whether any base plan is a full text index.void
setFilter(Filter filter)
Use the given filter.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.oak.spi.query.QueryIndex.IndexPlan
getAdditionalMessages, logWarningForPathFilterMismatch
-
-
-
-
Method Detail
-
getCostPerExecution
public double getCostPerExecution()
Description copied from interface:QueryIndex.IndexPlan
The cost to execute the query once. The returned value should approximately match the number of disk read operations plus the number of network roundtrips (worst case).- Specified by:
getCostPerExecution
in interfaceQueryIndex.IndexPlan
- Returns:
- the cost per execution, in estimated number of I/O operations
-
getCostPerEntry
public double getCostPerEntry()
Description copied from interface:QueryIndex.IndexPlan
The cost to read one entry from the cursor. The returned value should approximately match the number of disk read operations plus the number of network roundtrips (worst case).- Specified by:
getCostPerEntry
in interfaceQueryIndex.IndexPlan
- Returns:
- the lookup cost per entry, in estimated number of I/O operations
-
getEstimatedEntryCount
public long getEstimatedEntryCount()
Description copied from interface:QueryIndex.IndexPlan
The estimated number of entries in the cursor that is returned by the query method, when using this plan. This value does not have to be accurate.- Specified by:
getEstimatedEntryCount
in interfaceQueryIndex.IndexPlan
- Returns:
- the estimated number of entries
-
getFilter
public Filter getFilter()
Description copied from interface:QueryIndex.IndexPlan
The filter to use.- Specified by:
getFilter
in interfaceQueryIndex.IndexPlan
- Returns:
- the filter
-
setFilter
public void setFilter(Filter filter)
Description copied from interface:QueryIndex.IndexPlan
Use the given filter.- Specified by:
setFilter
in interfaceQueryIndex.IndexPlan
-
isDelayed
public boolean isDelayed()
Whether any base plan is delayed.- Specified by:
isDelayed
in interfaceQueryIndex.IndexPlan
- Returns:
- true if yes
-
isDeprecated
public boolean isDeprecated()
Description copied from interface:QueryIndex.IndexPlan
Whether the index is deprecated.- Specified by:
isDeprecated
in interfaceQueryIndex.IndexPlan
- Returns:
- if it is deprecated
-
isFulltextIndex
public boolean isFulltextIndex()
Whether any base plan is a full text index.- Specified by:
isFulltextIndex
in interfaceQueryIndex.IndexPlan
- Returns:
- true if yes
-
includesNodeData
public boolean includesNodeData()
Whether all base plan include node data.- Specified by:
includesNodeData
in interfaceQueryIndex.IndexPlan
- Returns:
- true if yes
-
getSortOrder
public java.util.List<QueryIndex.OrderEntry> getSortOrder()
An aggregated query can not sort, as it gets results from a number of indexes.- Specified by:
getSortOrder
in interfaceQueryIndex.IndexPlan
- Returns:
- null
-
getPropertyRestriction
@Nullable public @Nullable Filter.PropertyRestriction getPropertyRestriction()
Description copied from interface:QueryIndex.IndexPlan
The property restriction for this index plan ornull
if this index plan isn't base on a property restriction. E.g. a plan based on an order by clause in the query.- Specified by:
getPropertyRestriction
in interfaceQueryIndex.IndexPlan
- Returns:
- the restriction this plan is based on or
null
.
-
copy
public QueryIndex.IndexPlan copy()
Description copied from interface:QueryIndex.IndexPlan
Creates a cloned copy of current plan. Mostly used when the filter needs to be modified for a given call- Specified by:
copy
in interfaceQueryIndex.IndexPlan
- Returns:
- clone of current plan
-
getDefinition
public NodeState getDefinition()
Description copied from interface:QueryIndex.IndexPlan
The node state with the index definition.- Specified by:
getDefinition
in interfaceQueryIndex.IndexPlan
- Returns:
- the node state with the index definition.
-
getPathPrefix
public java.lang.String getPathPrefix()
Description copied from interface:QueryIndex.IndexPlan
The path prefix for this index plan.- Specified by:
getPathPrefix
in interfaceQueryIndex.IndexPlan
-
getSupportsPathRestriction
public boolean getSupportsPathRestriction()
Description copied from interface:QueryIndex.IndexPlan
Whether index for this plan supports handling path restrictions natively.- Specified by:
getSupportsPathRestriction
in interfaceQueryIndex.IndexPlan
-
getAttribute
@Nullable public @Nullable java.lang.Object getAttribute(java.lang.String name)
Description copied from interface:QueryIndex.IndexPlan
Returns the value of the named attribute as anObject
, ornull
if no attribute of the given name exists.- Specified by:
getAttribute
in interfaceQueryIndex.IndexPlan
- Parameters:
name
-String
specifying the name of the attribute- Returns:
- an
Object
containing the value of the attribute, ornull
if the attribute does not exist
-
getPlanName
public java.lang.String getPlanName()
Description copied from interface:QueryIndex.IndexPlan
Get the unique plan name.- Specified by:
getPlanName
in interfaceQueryIndex.IndexPlan
- Returns:
- the plan name
-
-