Class GaussianIntervalPoller

  • All Implemented Interfaces:
    ComponentLifecycle, Poller

    public class GaussianIntervalPoller
    extends ScheduledTaskPoller

    Implementation of Poller which polls at a random interval with a normal distribution.

    Note: Logic is as follows:

         Random.nextGaussian() * getMeanInterval() + getStandardDeviationInterval().

    In the adapter configuration file this class is aliased as gaussian-interval-poller which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • GaussianIntervalPoller

        public GaussianIntervalPoller()

        Creates a new instance. Default mean is 0 seconds and standard deviation is 20 seconds.

      • GaussianIntervalPoller

        public GaussianIntervalPoller​(TimeInterval meanInterval,
                                      TimeInterval standardDeviationInterval)
    • Method Detail

      • setMeanInterval

        public void setMeanInterval​(TimeInterval meanInterval)
        Set the mean to be used in poll interval calculation.
        Parameters:
        meanInterval - the mean interval (default 0 seconds)
      • getStandardDeviationInterval

        public TimeInterval getStandardDeviationInterval()
      • setStandardDeviationInterval

        public void setStandardDeviationInterval​(TimeInterval standardDeviationInterval)
        Set the standard deviation to be used in poll interval calculation.
        Parameters:
        standardDeviationInterval - the standard deviation interval (default 20 seconds)