Interface Deadline
- All Known Implementing Classes:
StaticDeadline
Common interface providing a deadline through the method
checkRemainingTimeMillis()
.-
Method Summary
-
Method Details
-
checkRemainingTimeMillis
long checkRemainingTimeMillis()- Returns:
- The remaining time to the deadline in milliseconds.
- Throws:
SearchTimeoutException
- If the deadline was reached and it's a hard deadline requiring immediate failure.
-
forceTimeout
- Parameters:
cause
- The cause of the timeout, ornull
.- Throws:
SearchTimeoutException
- If the deadline is a hard deadline requiring immediate failure.
-
forceTimeoutAndCreateException
- Parameters:
cause
- The cause of the timeout, ornull
.- Returns:
- An exception to be thrown on timeout.
-