Class BurstFilter.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setRate

        public BurstFilter.Builder setRate​(float rate)
        Sets the average number of events per second to allow. This must be a positive number.
      • setMaxBurst

        public BurstFilter.Builder setMaxBurst​(long maxBurst)
        Sets the maximum number of events that can occur before events are filtered for exceeding the average rate. The default is 10 times the rate.
      • setOnMismatch

        public BurstFilter.Builder setOnMismatch​(Filter.Result onMismatch)
        Sets the Result to return when the filter does not match. The default is Result.DENY.
      • build

        public BurstFilter build()
        Description copied from interface: Builder
        Builds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.
        Specified by:
        build in interface Builder<BurstFilter>
        Returns:
        the configured instance.