Class Poller.PollOutcome<E>

  • Type Parameters:
    E - type of the resolved content
    Enclosing class:
    Poller<T>

    public static class Poller.PollOutcome<E>
    extends Object
    Class that represents the outcome of a poll. Instances of this type are constructed by the poller at the conclusion of all polling. To clarify: a poll outcome refers to the end result after many poll attempts, and a poll answer is the answer to any individual poll attempt.
    • Field Detail

      • content

        @Nullable
        public final E content
        An object that represents the resolved state of the poll.
      • duration

        public final Duration duration
        Gets the polling duration. This may not be exact.
    • Method Detail

      • getNumAttempts

        public int getNumAttempts()
        Gets the number of times the poll was attempted. This is the numbef of times the check() function is invoked.
        Returns:
        count of attempts
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object