Interface RemainingTime

All Superinterfaces:
Supplier<org.elasticsearch.core.TimeValue>

public interface RemainingTime extends Supplier<org.elasticsearch.core.TimeValue>
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    from(Supplier<Instant> currentTime, org.elasticsearch.core.TimeValue remainingTime)
    Create a Supplier that returns a decreasing TimeValue on each invocation, representing the amount of time until the call times out.

    Methods inherited from interface java.util.function.Supplier

    get
  • Method Details

    • from

      static RemainingTime from(Supplier<Instant> currentTime, org.elasticsearch.core.TimeValue remainingTime)
      Create a Supplier that returns a decreasing TimeValue on 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_VALUE is a special case where the remaining time is always TimeValue.MAX_VALUE.