Class CallerSpecificQueryLimit

java.lang.Object
org.apache.solr.search.CallerSpecificQueryLimit
All Implemented Interfaces:
org.apache.lucene.index.QueryTimeout, org.apache.solr.search.QueryLimit

public class CallerSpecificQueryLimit extends Object implements org.apache.solr.search.QueryLimit
Helper class to simulate query timeouts at specific points in various components that call QueryLimits.shouldExit(). This class uses CallerMatcher to collect the matching callers information and enforce the count limits.
  • Constructor Details

    • CallerSpecificQueryLimit

      public CallerSpecificQueryLimit(Collection<String> callerExprs)
      Signal a timeout in places that match the calling classes (and methods).
      Parameters:
      callerExprs - list of expressions in the format of ( simpleClassName[.methodName] | * )[:NNN]. If the list is empty or null then the first call to shouldExit() from any caller will match.
  • Method Details

    • getCallerMatcher

      public CallerMatcher getCallerMatcher()
    • shouldExit

      public boolean shouldExit()
      Specified by:
      shouldExit in interface org.apache.lucene.index.QueryTimeout
    • currentValue

      public Object currentValue()
      Specified by:
      currentValue in interface org.apache.solr.search.QueryLimit