org.apache.lucene.index

## Interface QueryTimeout

All Known Implementing Classes:
  QueryTimeoutImpl

    public interface QueryTimeout

Base for query timeout implementations, which will provide a `shouldExit()` method, used with `ExitableDirectoryReader`.

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`default boolean` `isTimeoutEnabled()` Returns true if timeouts are enabled for this query (i.e.
`boolean` `shouldExit()` Called from `ExitableDirectoryReader.ExitableTermsEnum.next()` to determine whether to stop processing a query.

### Method Detail

#### shouldExit

    boolean shouldExit()

Called from `ExitableDirectoryReader.ExitableTermsEnum.next()` to determine whether to stop processing a query.

#### isTimeoutEnabled

    default boolean isTimeoutEnabled()

Returns true if timeouts are enabled for this query (i.e. if shouldExit would ever return true)