Class StatePoller.Builder<S,​F extends java.lang.Enum<F>>

  • Enclosing class:
    StatePoller<S,​F extends java.lang.Enum<F>>

    public static class StatePoller.Builder<S,​F extends java.lang.Enum<F>>
    extends java.lang.Object
    Builder for the StatePoller.
    • Method Detail

      • defaultPollInterval

        public StatePoller.Builder<S,​F> defaultPollInterval​(long defaultPollInterval,
                                                                  java.util.concurrent.TimeUnit unit)
        Allows specifying the default poll interval.
        Parameters:
        defaultPollInterval - Default poll interval.
        unit - TimeUnit for the default poll interval.
        Returns:
        this.
      • pollMargin

        public StatePoller.Builder<S,​F> pollMargin​(long margin,
                                                         java.util.concurrent.TimeUnit unit)
        Allows specifying the poll margin. This is the margin before considering polling not triggering.
        Parameters:
        margin - Margin before assuming polling not triggering.
        unit - TimeUnit.
        Returns:
        this.
      • successLogLevel

        public StatePoller.Builder<S,​F> successLogLevel​(java.util.logging.Level successLogLevel)
        Allows specifying the success log Level.
        Parameters:
        successLogLevel - Success log Level. Providing null will reset to default.
        Returns:
        this.
      • logger

        public StatePoller.Builder<S,​F> logger​(java.util.logging.Logger logger)
        Allows specifying the Logger.
        Parameters:
        logger - Logger. Providing null will reset to default.
        Returns:
        this.
      • identifier

        public StatePoller.Builder<S,​F> identifier​(java.lang.String identifier)
        Allows providing an identifier in the log message to identify the StatePoller.
        Parameters:
        identifier - Identifier.
        Returns:
        this.