Module org.elasticsearch.xcore
Interface RemainingTime
- All Superinterfaces:
Supplier<org.elasticsearch.core.TimeValue>
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic RemainingTimeCreate aSupplierthat returns a decreasingTimeValueon each invocation, representing the amount of time until the call times out.
-
Method Details
-
from
static RemainingTime from(Supplier<Instant> currentTime, org.elasticsearch.core.TimeValue remainingTime) Create aSupplierthat returns a decreasingTimeValueon each invocation, representing the amount of time until the call times out. The timer starts when this method is called and counts down from remainingTime to 0. currentTime should return the most up-to-date system time, for example Instant.now() or Clock.instant().TimeValue.MAX_VALUEis a special case where the remaining time is always TimeValue.MAX_VALUE.
-