AsyncQueueFullPolicypublic class DiscardingAsyncQueueFullPolicy extends DefaultAsyncQueueFullPolicy
| Constructor | 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 | 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)
AsyncQueueFullPolicygetRoute in interface AsyncQueueFullPolicygetRoute in class DefaultAsyncQueueFullPolicybackgroundThreadId - 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-2018. 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.