QueryTimeoutImpl

class QueryTimeoutImpl(timeAllowed: Long) : QueryTimeout

An implementation of QueryTimeout that can be used by the ExitableDirectoryReader class to time out and exit out when a query takes a long time to rewrite.

Constructors

Link copied to clipboard
constructor(timeAllowed: Long)

Functions

Link copied to clipboard

Returns time at which to time out, in nanoseconds relative to the (JVM-specific) epoch for System.nanoTime, to compare with the value returned by nanoTime().

Link copied to clipboard
fun reset()

Reset the timeout value.

Link copied to clipboard
open override fun shouldExit(): Boolean

Return true if reset has not been called and the elapsed time has exceeded the time allowed.

Link copied to clipboard
open override fun toString(): String