public class QueryEngineSettings extends java.lang.Object implements QueryEngineSettingsMBean, QueryLimits
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_FAST_QUERY_SIZE |
static long |
DEFAULT_QUERY_LIMIT_IN_MEMORY |
static long |
DEFAULT_QUERY_LIMIT_READS |
static java.lang.String |
OAK_QUERY_FAIL_TRAVERSAL |
static java.lang.String |
OAK_QUERY_LIMIT_IN_MEMORY |
static java.lang.String |
OAK_QUERY_LIMIT_READS |
static java.lang.String |
SQL2_OPTIMISATION_FLAG
the flag used to turn on/off the optimisations on top of the
org.apache.jackrabbit.oak.query.Query object. |
static java.lang.String |
SQL2_OPTIMISATION_FLAG_2 |
static boolean |
SQL2_OPTIMIZATION_2 |
TYPE
Constructor and Description |
---|
QueryEngineSettings() |
QueryEngineSettings(StatisticsProvider statisticsProvider) |
Modifier and Type | Method and Description |
---|---|
boolean |
getFailTraversal()
Whether queries that don't use an index will fail (throw an exception).
|
boolean |
getFullTextComparisonWithoutIndex() |
@NotNull java.lang.String[] |
getIgnoredClassNamesInCallTrace()
Retrieve the java package names / full qualified class names which should be
ignored when finding the class starting a query
|
long |
getLimitInMemory()
Get the limit on how many nodes a query may read at most into memory, for
"order by" and "distinct" queries.
|
long |
getLimitReads()
Get the limit on how many nodes a query may read at most (raw read
operations, including skipped nodes).
|
long |
getQueryLengthErrorLimit() |
long |
getQueryLengthWarnLimit() |
QueryStatsMBean |
getQueryStats() |
QueryStatsReporter |
getQueryStatsReporter() |
QueryValidator |
getQueryValidator() |
java.lang.String |
getQueryValidatorJson() |
StatisticsProvider |
getStatisticsProvider() |
java.lang.String |
getStrictPathRestriction()
Whether Path restrictions are enabled while figuring out index plan
|
boolean |
isFastQuerySize()
Whether the query result size should return an estimation for large queries.
|
boolean |
isSql2Optimisation() |
void |
setFailTraversal(boolean failTraversal)
Set whether queries that don't use an index will fail (throw an exception).
|
void |
setFastQuerySize(boolean fastQuerySize) |
void |
setFullTextComparisonWithoutIndex(boolean fullTextComparisonWithoutIndex) |
void |
setIgnoredClassNamesInCallTrace(@NotNull java.lang.String[] packageNames)
Set or remove java package/class names which are ignored from finding the
invoking class for queries.
|
void |
setLimitInMemory(long limitInMemory)
Change the limit.
|
void |
setLimitReads(long limitReads)
Change the limit.
|
void |
setQueryValidatorPattern(java.lang.String key,
java.lang.String pattern,
java.lang.String comment,
boolean failQuery)
Set or remove a query validator pattern.
|
void |
setStrictPathRestriction(java.lang.String strictPathRestriction)
Whether path restrictions of indexes (excludedPaths / includedPaths) are taken into account during query execution,
for Lucene indexes.
|
java.lang.String |
toString() |
public static final java.lang.String SQL2_OPTIMISATION_FLAG
org.apache.jackrabbit.oak.query.Query
object.
-Doak.query.sql2optimisation
public static final java.lang.String SQL2_OPTIMISATION_FLAG_2
public static final boolean SQL2_OPTIMIZATION_2
public static final java.lang.String OAK_QUERY_LIMIT_IN_MEMORY
public static final long DEFAULT_QUERY_LIMIT_IN_MEMORY
public static final java.lang.String OAK_QUERY_LIMIT_READS
public static final long DEFAULT_QUERY_LIMIT_READS
public static final java.lang.String OAK_QUERY_FAIL_TRAVERSAL
public static final boolean DEFAULT_FAST_QUERY_SIZE
public QueryEngineSettings()
public QueryEngineSettings(StatisticsProvider statisticsProvider)
public long getQueryLengthWarnLimit()
public long getQueryLengthErrorLimit()
public long getLimitInMemory()
QueryEngineSettingsMBean
getLimitInMemory
in interface QueryEngineSettingsMBean
getLimitInMemory
in interface QueryLimits
public void setLimitInMemory(long limitInMemory)
QueryEngineSettingsMBean
setLimitInMemory
in interface QueryEngineSettingsMBean
limitInMemory
- the new limitpublic long getLimitReads()
QueryEngineSettingsMBean
getLimitReads
in interface QueryEngineSettingsMBean
getLimitReads
in interface QueryLimits
public void setLimitReads(long limitReads)
QueryEngineSettingsMBean
setLimitReads
in interface QueryEngineSettingsMBean
limitReads
- the new limitpublic boolean getFailTraversal()
QueryEngineSettingsMBean
getFailTraversal
in interface QueryEngineSettingsMBean
getFailTraversal
in interface QueryLimits
public void setFailTraversal(boolean failTraversal)
QueryEngineSettingsMBean
setFailTraversal
in interface QueryEngineSettingsMBean
failTraversal
- the new value for this settingpublic boolean isFastQuerySize()
QueryEngineSettingsMBean
isFastQuerySize
in interface QueryEngineSettingsMBean
public void setFastQuerySize(boolean fastQuerySize)
setFastQuerySize
in interface QueryEngineSettingsMBean
public java.lang.String getStrictPathRestriction()
QueryEngineSettingsMBean
getStrictPathRestriction
in interface QueryEngineSettingsMBean
getStrictPathRestriction
in interface QueryLimits
public void setStrictPathRestriction(java.lang.String strictPathRestriction)
QueryEngineSettingsMBean
setStrictPathRestriction
in interface QueryEngineSettingsMBean
strictPathRestriction
- Set path restriction: Expected value is either of ENABLE/DISABLE/WARN
ENABLE: enable path restriction- Index won't be used if index definition path restrictions are not compatible with query's path restriction
DISABLE: path restrictions are not taken into account while querying
WARN: path restrictions are not taken into account but a warning will be logged if query path restrictions are not compatible with index path restrictionspublic void setFullTextComparisonWithoutIndex(boolean fullTextComparisonWithoutIndex)
public boolean getFullTextComparisonWithoutIndex()
getFullTextComparisonWithoutIndex
in interface QueryLimits
public boolean isSql2Optimisation()
public QueryStatsMBean getQueryStats()
public QueryStatsReporter getQueryStatsReporter()
public StatisticsProvider getStatisticsProvider()
public void setQueryValidatorPattern(java.lang.String key, java.lang.String pattern, java.lang.String comment, boolean failQuery)
QueryEngineSettingsMBean
setQueryValidatorPattern
in interface QueryEngineSettingsMBean
key
- the keypattern
- the regular expression pattern (empty to remove the
pattern)comment
- a commentfailQuery
- whether matching queries should fail (true) or just log
a warning (false)public java.lang.String getQueryValidatorJson()
getQueryValidatorJson
in interface QueryEngineSettingsMBean
public QueryValidator getQueryValidator()
public void setIgnoredClassNamesInCallTrace(@NotNull @NotNull java.lang.String[] packageNames)
QueryEngineSettingsMBean
setIgnoredClassNamesInCallTrace
in interface QueryEngineSettingsMBean
packageNames
- the class names to be ignored.@NotNull public @NotNull java.lang.String[] getIgnoredClassNamesInCallTrace()
QueryLimits
getIgnoredClassNamesInCallTrace
in interface QueryEngineSettingsMBean
getIgnoredClassNamesInCallTrace
in interface QueryLimits
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.