Interface Watch.Growth.TerminationCondition<InputT,​StateT>

    • Method Detail

      • forNewInput

        StateT forNewInput​(org.joda.time.Instant now,
                           @Nullable InputT input)
        Called by the Watch transform to create a new independent termination state for a newly arrived InputT.
      • onSeenNewOutput

        default StateT onSeenNewOutput​(org.joda.time.Instant now,
                                       StateT state)
        Called by the Watch transform to compute a new termination state, in case after calling the Watch.Growth.PollFn for the current input, the Watch.Growth.PollResult included a previously unseen OutputT.
      • onPollComplete

        default StateT onPollComplete​(StateT state)
        Called by the Watch transform to compute a new termination state after every poll completion.
      • canStopPolling

        boolean canStopPolling​(org.joda.time.Instant now,
                               StateT state)
        Called by the Watch transform to determine whether the given termination state signals that Watch should stop calling Watch.Growth.PollFn for the current input, regardless of whether the last Watch.Growth.PollResult was complete or incomplete.
      • toString

        java.lang.String toString​(StateT state)
        Creates a human-readable representation of the given state of this condition.