public class DiscardingAsyncQueueFullPolicy extends DefaultAsyncQueueFullPolicy
Constructor and Description |
---|
DiscardingAsyncQueueFullPolicy(Level thresholdLevel)
Constructs a router that will discard events equal or less specific
than the specified threshold level when the queue is full.
|
Modifier and Type | Method and Description |
---|---|
static long |
getDiscardCount(AsyncQueueFullPolicy router) |
EventRoute |
getRoute(long backgroundThreadId,
Level level)
Returns the appropriate route for the current log event, given the specified parameters.
|
Level |
getThresholdLevel() |
public DiscardingAsyncQueueFullPolicy(Level thresholdLevel)
thresholdLevel
- level of events to discardpublic EventRoute getRoute(long backgroundThreadId, Level level)
AsyncQueueFullPolicy
getRoute
in interface AsyncQueueFullPolicy
getRoute
in class DefaultAsyncQueueFullPolicy
backgroundThreadId
- the thread ID of the background thread. Can be compared with the current thread's ID.level
- the level of the log eventpublic static long getDiscardCount(AsyncQueueFullPolicy router)
public Level getThresholdLevel()
Copyright © 1999-2017. 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.