Class DefaultAsyncQueueFullPolicy

All Implemented Interfaces:
Direct Known Subclasses:

public class DefaultAsyncQueueFullPolicy extends Object implements AsyncQueueFullPolicy
Default router: enqueue the event for asynchronous logging in the background thread, unless the current thread is the background thread and the queue is full (enqueueing would cause a deadlock). In that case send the event directly to the appender (in the current thread).
  • Constructor Details

    • DefaultAsyncQueueFullPolicy

      public DefaultAsyncQueueFullPolicy()
  • Method Details

    • getRoute

      public EventRoute getRoute(long backgroundThreadId, Level level)
      Description copied from interface: AsyncQueueFullPolicy
      Returns the appropriate route for the current log event, given the specified parameters.
      Specified by:
      getRoute in interface AsyncQueueFullPolicy
      backgroundThreadId - the thread ID of the background thread. Can be compared with the current thread's ID.
      level - the level of the log event
      the appropriate route for the current event