Class DefaultAsyncQueueFullPolicy

  • All Implemented Interfaces:
    AsyncQueueFullPolicy
    Direct Known Subclasses:
    DiscardingAsyncQueueFullPolicy

    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 Detail

      • DefaultAsyncQueueFullPolicy

        public DefaultAsyncQueueFullPolicy()
    • Method Detail

      • 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
        Parameters:
        backgroundThreadId - the thread ID of the background thread. Can be compared with the current thread's ID.
        level - the level of the log event
        Returns:
        the appropriate route for the current event