Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.logging.log4j.core.filter
Class BurstFilter.Builder

    java.lang.Object
      org.apache.logging.log4j.core.filter.BurstFilter.Builder

All Implemented Interfaces:
  Builder<BurstFilter>

Enclosing class:
  BurstFilter

    public static class BurstFilter.Builder

extends Object
implements Builder<BurstFilter>

Constructor Summary
`BurstFilter.Builder()`

Method Summary
`BurstFilter` | `build()` Builds the plugin object after all configuration has been set.
`BurstFilter.Builder` | `setLevel(org.apache.logging.log4j.Level level)` Sets the logging level to use.
`BurstFilter.Builder` | `setMaxBurst(long maxBurst)` Sets the maximum number of events that can occur before events are filtered for exceeding the average rate.
`BurstFilter.Builder` | `setOnMatch(Filter.Result onMatch)` Sets the Result to return when the filter matches.
`BurstFilter.Builder` | `setOnMismatch(Filter.Result onMismatch)` Sets the Result to return when the filter does not match.
`BurstFilter.Builder` | `setRate(float rate)` Sets the average number of events per second to allow.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BurstFilter.Builder

    public BurstFilter.Builder()

Method Detail

### setLevel

    public BurstFilter.Builder setLevel(org.apache.logging.log4j.Level level)

  Sets the logging level to use.

### 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.

### setOnMatch

    public BurstFilter.Builder setOnMatch(Filter.Result onMatch)

  Sets the Result to return when the filter matches. Defaults to Result.NEUTRAL.

### 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 plugin object after all configuration has been set. This will use default values for any unspecified attributes for the plugin.

  Specified by:
    `build` in interface `Builder<BurstFilter>`
  Returns:
    the configured plugin instance.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.