Package org.apache.solr.search
Class CallerSpecificQueryLimit
java.lang.Object
org.apache.solr.search.CallerSpecificQueryLimit
- All Implemented Interfaces:
org.apache.lucene.index.QueryTimeout,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 Summary
ConstructorsConstructorDescriptionCallerSpecificQueryLimit(Collection<String> callerExprs) Signal a timeout in places that match the calling classes (and methods). -
Method Summary
Modifier and TypeMethodDescriptionbooleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.solr.search.QueryLimit
adjustShardRequestLimit
-
Constructor Details
-
CallerSpecificQueryLimit
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 toshouldExit()from any caller will match.
-
-
Method Details
-
getCallerMatcher
-
shouldExit
public boolean shouldExit()- Specified by:
shouldExitin interfaceorg.apache.lucene.index.QueryTimeout
-
currentValue
- Specified by:
currentValuein interfaceorg.apache.solr.search.QueryLimit
-