Class AsyncAppenderBase<E>

  • Type Parameters:
    E -
    All Implemented Interfaces:
    Appender<E>, AppenderAttachable<E>, ContextAware, FilterAttachable<E>, LifeCycle
    Direct Known Subclasses:
    AsyncAppender

    @Deprecated(since="2022-01-27")
    public class AsyncAppenderBase<E>
    extends UnsynchronizedAppenderBase<E>
    implements AppenderAttachable<E>
    Deprecated.
    This internal logback API is not supported by AEM as a Cloud Service.
    This appender and derived classes, log events asynchronously. In order to avoid loss of logging events, this appender should be closed. It is the user's responsibility to close appenders, typically at the end of the application lifecycle.

    This appender buffers events in a BlockingQueue. AsyncAppenderBase.Worker thread created by this appender takes events from the head of the queue, and dispatches them to the single appender attached to this appender.

    Please refer to the logback manual for further information about this appender.

    Since:
    1.0.4
    • Field Detail

      • DEFAULT_QUEUE_SIZE

        public static final int DEFAULT_QUEUE_SIZE
        Deprecated.
        The default buffer size.
        See Also:
        Constant Field Values
      • DEFAULT_MAX_FLUSH_TIME

        public static final int DEFAULT_MAX_FLUSH_TIME
        Deprecated.
        The default maximum queue flush time allowed during appender stop. If the worker takes longer than this time it will exit, discarding any remaining items in the queue
        See Also:
        Constant Field Values
    • Constructor Detail

      • AsyncAppenderBase

        public AsyncAppenderBase()
        Deprecated.
    • Method Detail

      • getQueueSize

        public int getQueueSize()
        Deprecated.
      • setQueueSize

        public void setQueueSize​(int queueSize)
        Deprecated.
      • getDiscardingThreshold

        public int getDiscardingThreshold()
        Deprecated.
      • setDiscardingThreshold

        public void setDiscardingThreshold​(int discardingThreshold)
        Deprecated.
      • getMaxFlushTime

        public int getMaxFlushTime()
        Deprecated.
      • setMaxFlushTime

        public void setMaxFlushTime​(int maxFlushTime)
        Deprecated.
      • getNumberOfElementsInQueue

        public int getNumberOfElementsInQueue()
        Deprecated.
        Returns the number of elements currently in the blocking queue.
        Returns:
        number of elements currently in the queue.
      • setNeverBlock

        public void setNeverBlock​(boolean neverBlock)
        Deprecated.
      • isNeverBlock

        public boolean isNeverBlock()
        Deprecated.
      • getRemainingCapacity

        public int getRemainingCapacity()
        Deprecated.
        The remaining capacity available in the blocking queue.
        Returns:
        the remaining capacity
      • isAttached

        public boolean isAttached​(Appender<E> eAppender)
        Deprecated.
        Description copied from interface: AppenderAttachable
        Returns true if the specified appender is in list of attached attached, false otherwise.
        Specified by:
        isAttached in interface AppenderAttachable<E>
      • detachAppender

        public boolean detachAppender​(java.lang.String name)
        Deprecated.
        Description copied from interface: AppenderAttachable
        Detach the appender with the name passed as parameter from the list of appenders.
        Specified by:
        detachAppender in interface AppenderAttachable<E>