Class Ratelimit.Builder

  • Enclosing class:
    Ratelimit

    public static class Ratelimit.Builder
    extends Object
    Builder.
    • Constructor Detail

      • Builder

        public Builder()
        Instantiates a new builder.
    • Method Detail

      • build

        public Ratelimit build()
        Builds a Ratelimit.
        Returns:
        the new Ratelimit instance
      • addCharacteristics

        public Ratelimit.Builder addCharacteristics​(String characteristics)
        Adds a new element to characteristics.
        Parameters:
        characteristics - the new element to be added
        Returns:
        the Ratelimit builder
      • characteristics

        public Ratelimit.Builder characteristics​(List<String> characteristics)
        Set the characteristics. Existing characteristics will be replaced.
        Parameters:
        characteristics - the characteristics
        Returns:
        the Ratelimit builder
      • countingExpression

        public Ratelimit.Builder countingExpression​(String countingExpression)
        Set the countingExpression.
        Parameters:
        countingExpression - the countingExpression
        Returns:
        the Ratelimit builder
      • mitigationTimeout

        public Ratelimit.Builder mitigationTimeout​(long mitigationTimeout)
        Set the mitigationTimeout.
        Parameters:
        mitigationTimeout - the mitigationTimeout
        Returns:
        the Ratelimit builder
      • period

        public Ratelimit.Builder period​(long period)
        Set the period.
        Parameters:
        period - the period
        Returns:
        the Ratelimit builder
      • requestsPerPeriod

        public Ratelimit.Builder requestsPerPeriod​(long requestsPerPeriod)
        Set the requestsPerPeriod.
        Parameters:
        requestsPerPeriod - the requestsPerPeriod
        Returns:
        the Ratelimit builder