Class PollableOptions

java.lang.Object
com.broadleafcommerce.metadata.dsl.core.extension.PollableOptions
All Implemented Interfaces:
Copyable<PollableOptions>, Serializable

public class PollableOptions extends Object implements Serializable, Copyable<PollableOptions>
Author:
Nick Crum (ncrum)
See Also:
  • Constructor Details

    • PollableOptions

      public PollableOptions()
    • PollableOptions

      public PollableOptions(PollableOptions pollableOptions)
  • Method Details

    • copy

      public PollableOptions copy()
      Specified by:
      copy in interface Copyable<PollableOptions>
      Returns:
      a deep copy of this instance
    • errorLimit

      public PollableOptions errorLimit(int errorLimit)
    • limit

      public PollableOptions limit(int limit)
    • strategy

      public PollableOptions strategy(PollableOptions.PollStrategy<?> strategy)
    • constantStrategy

      public PollableOptions constantStrategy(int interval)
      Creates a constant polling strategy.
      Parameters:
      interval - the constant interval at which to poll
      Returns:
      this
    • linearStrategy

      public PollableOptions linearStrategy(int start, int increment)
      Creates a linear polling strategy.
      Parameters:
      start - the base interval at which to poll
      increment - the increment at which the starting interval is increased each poll
      Returns:
      this
    • exponentialStrategy

      public PollableOptions exponentialStrategy(int interval, int min, int max)
      Creates an exponential polling strategy.
      Parameters:
      interval - the base interval
      min - the minimum interval at which to poll
      max - the minimum interval at which to poll
      Returns:
      this
    • getErrorLimit

      public int getErrorLimit()
      This represents the number of polling failures permitted before stopping.
    • getLimit

      public int getLimit()
      This represents the number of poll requests permitted before stopping.
    • getStrategy

      public PollableOptions.PollStrategy<?> getStrategy()
      This represents the strategy used for calculating the interval between each poll request.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object