Class JiraLuceneQueryTimeout

java.lang.Object
com.atlassian.jira.search.lucene.timeout.JiraLuceneQueryTimeout
All Implemented Interfaces:
org.apache.lucene.index.QueryTimeout

public final class JiraLuceneQueryTimeout extends Object implements org.apache.lucene.index.QueryTimeout
Lucene QueryTimeout implementation that enforces a per-search timeout.

Instead of measuring from reader creation time, this class consults QueryTimeoutContext which is marked immediately before each invocation of Lucene IndexSearcher operations. This allows applying time budgets per individual search call even when Lucene IndexReader instances are reused across searches.

  • Constructor Details

    • JiraLuceneQueryTimeout

      public JiraLuceneQueryTimeout(Duration timeout)
  • Method Details

    • shouldExit

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

      public String toString()
      Overridden in order to provide more user-friendly errors to the UI elements that display Exception verbatim.
      Overrides:
      toString in class Object