public static class BurstFilter.Builder extends AbstractFilter.AbstractFilterBuilder<BurstFilter.Builder> implements Builder<BurstFilter>
ATTR_ON_MATCH, ATTR_ON_MISMATCH
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
BurstFilter |
build()
Builds the object after all configuration has been set.
|
BurstFilter.Builder |
setLevel(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 |
setRate(float rate)
Sets the average number of events per second to allow.
|
asBuilder, getOnMatch, getOnMismatch, setOnMatch, setOnMismatch
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getErrorPrefix, isValid
public BurstFilter.Builder setLevel(Level level)
level
- the logging level to use.public BurstFilter.Builder setRate(float rate)
rate
- the average number of events per second to allow. This must be a positive number.public BurstFilter.Builder setMaxBurst(long maxBurst)
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.public BurstFilter build()
Builder
build
in interface Builder<BurstFilter>
Copyright © 1999-2023 The 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.