Class QueryConfiguration

java.lang.Object
org.infinispan.commons.configuration.attributes.ConfigurationElement<QueryConfiguration>
org.infinispan.configuration.cache.QueryConfiguration
All Implemented Interfaces:
org.infinispan.commons.configuration.attributes.Matchable<QueryConfiguration>, org.infinispan.commons.configuration.attributes.Updatable<QueryConfiguration>

public class QueryConfiguration extends org.infinispan.commons.configuration.attributes.ConfigurationElement<QueryConfiguration>
Configures query options and defaults
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Integer>
     
    static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Integer>
     

    Fields inherited from class org.infinispan.commons.configuration.attributes.ConfigurationElement

    attributes, CHILDLESS, children, element, repeated
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    QueryConfiguration(org.infinispan.commons.configuration.attributes.AttributeSet attributes)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Limits the number of results returned by a query.
    int
    Limit the required accuracy of the hit count for the indexed queries to an upper-bound.

    Methods inherited from class org.infinispan.commons.configuration.attributes.ConfigurationElement

    attributes, child, children, children, elementName, equals, findAttribute, hashCode, isModified, list, matches, toString, update, validateUpdate, write

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT_MAX_RESULTS

      public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Integer> DEFAULT_MAX_RESULTS
    • HIT_COUNT_ACCURACY

      public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Integer> HIT_COUNT_ACCURACY
  • Constructor Details

    • QueryConfiguration

      protected QueryConfiguration(org.infinispan.commons.configuration.attributes.AttributeSet attributes)
  • Method Details

    • defaultMaxResults

      public int defaultMaxResults()
      Limits the number of results returned by a query. Applies to indexed, non-indexed, and hybrid queries. Setting the default-max-results significantly improves the performance of queries that don't have an explicit limit set.
    • hitCountAccuracy

      public int hitCountAccuracy()
      Limit the required accuracy of the hit count for the indexed queries to an upper-bound. Setting the hit-count-accuracy could improve the performance of queries targeting large data sets. For optimal performances set this value not much above the expected hit count. If you do not require accurate hit counts, set it to a low value.