This appender buffers events in a BlockingQueue. 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.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv AppenderAttachableImpl | |
| pack-priv int | |
| pack-priv BlockingQueue | |
| public static final int | DEFAULT_MAX_FLUSH_TIME
The default maximum queue flush time allowed during appender stop. |
| public static final int | DEFAULT_QUEUE_SIZE
The default buffer size. |
| pack-priv int | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv static final int | |
| pack-priv AsyncAppenderBase |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addAppender(Appender<E> newAppender)
Implements ch. |
| protected void | |
| public void | detachAndStopAllAppenders()
Implements ch. |
| public boolean | detachAppender(Appender<E> eAppender)
Implements ch. |
| public boolean | detachAppender(String name)
Implements ch. |
| public Appender | getAppender(String name)
Implements ch. |
| public int | |
| public int | |
| public int | Returns: number of elements currently in the queue.Returns the number of elements currently in the blocking queue. |
| public int | |
| public int | Returns: the remaining capacityThe remaining capacity available in the blocking queue. |
| public boolean | isAttached(Appender<E> eAppender)
Implements ch. true if the specified appender is in list of
attached, false otherwise.
|
| protected boolean | Returns: - true if the event can be discarded, false otherwiseIs the eventObject passed as parameter discardable? |
| public boolean | |
| private boolean | |
| public Iterator | iteratorForAppenders()
Implements ch. |
| protected void | |
| private void | |
| private void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | start()
Overrides ch. Implements ch. |
| public void | stop()
Overrides ch. Implements ch. |
| aai | back to summary |
|---|---|
| pack-priv AppenderAttachableImpl<E> aai | |
| appenderCount | back to summary |
|---|---|
| pack-priv int appenderCount | |
| blockingQueue | back to summary |
|---|---|
| pack-priv BlockingQueue<E> blockingQueue | |
| DEFAULT_MAX_FLUSH_TIME | back to summary |
|---|---|
| public static final int DEFAULT_MAX_FLUSH_TIME 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 | |
| DEFAULT_QUEUE_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_QUEUE_SIZE The default buffer size. | |
| discardingThreshold | back to summary |
|---|---|
| pack-priv int discardingThreshold | |
| maxFlushTime | back to summary |
|---|---|
| pack-priv int maxFlushTime | |
| neverBlock | back to summary |
|---|---|
| pack-priv boolean neverBlock | |
| queueSize | back to summary |
|---|---|
| pack-priv int queueSize | |
| UNDEFINED | back to summary |
|---|---|
| pack-priv static final int UNDEFINED | |
| worker | back to summary |
|---|---|
| pack-priv AsyncAppenderBase<E>. | |
| AsyncAppenderBase | back to summary |
|---|---|
| public AsyncAppenderBase() | |
| addAppender | back to summary |
|---|---|
| public void addAppender(Appender<E> newAppender) Implements ch. Doc from ch. Add an appender. | |
| append | back to summary |
|---|---|
| protected void append(E eventObject) Implements abstract ch.
| |
| detachAndStopAllAppenders | back to summary |
|---|---|
| public void detachAndStopAllAppenders() Implements ch. Doc from ch. Detach and processPriorToRemoval all previously added appenders. | |
| detachAppender | back to summary |
|---|---|
| public boolean detachAppender(Appender<E> eAppender) Implements ch. Doc from ch. Detach the appender passed as parameter from the list of appenders. | |
| detachAppender | back to summary |
|---|---|
| public boolean detachAppender(String name) Implements ch. Doc from ch. Detach the appender with the name passed as parameter from the list of appenders. | |
| getAppender | back to summary |
|---|---|
| public Appender Implements ch. Doc from ch. Get an appender by name. | |
| getDiscardingThreshold | back to summary |
|---|---|
| public int getDiscardingThreshold() | |
| getMaxFlushTime | back to summary |
|---|---|
| public int getMaxFlushTime() | |
| getNumberOfElementsInQueue | back to summary |
|---|---|
| public int getNumberOfElementsInQueue() Returns the number of elements currently in the blocking queue.
| |
| getQueueSize | back to summary |
|---|---|
| public int getQueueSize() | |
| getRemainingCapacity | back to summary |
|---|---|
| public int getRemainingCapacity() The remaining capacity available in the blocking queue.
See also
| |
| isAttached | back to summary |
|---|---|
| public boolean isAttached(Appender<E> eAppender) Implements ch. Doc from ch. Returns | |
| isDiscardable | back to summary |
|---|---|
| protected boolean isDiscardable(E eventObject) Is the eventObject passed as parameter discardable? The base class's implementation of this method always returns 'false' but sub-classes may (and do) override this method. Note that only if the buffer is nearly full are events discarded. Otherwise, when the buffer is "not full" all events are logged.
| |
| isNeverBlock | back to summary |
|---|---|
| public boolean isNeverBlock() | |
| isQueueBelowDiscardingThreshold | back to summary |
|---|---|
| private boolean isQueueBelowDiscardingThreshold() | |
| iteratorForAppenders | back to summary |
|---|---|
| public Iterator Implements ch. Doc from ch. Get an iterator for appenders contained in the parent object. | |
| preprocess | back to summary |
|---|---|
| protected void preprocess(E eventObject) Pre-process the event prior to queueing. The base class does no pre-processing but subclasses can override this behavior. | |
| put | back to summary |
|---|---|
| private void put(E eventObject) | |
| putUninterruptibly | back to summary |
|---|---|
| private void putUninterruptibly(E eventObject) | |
| setDiscardingThreshold | back to summary |
|---|---|
| public void setDiscardingThreshold(int discardingThreshold) | |
| setMaxFlushTime | back to summary |
|---|---|
| public void setMaxFlushTime(int maxFlushTime) | |
| setNeverBlock | back to summary |
|---|---|
| public void setNeverBlock(boolean neverBlock) | |
| setQueueSize | back to summary |
|---|---|
| public void setQueueSize(int queueSize) | |
| start | back to summary |
|---|---|
| public void start() Overrides ch. Implements ch.
| |
| stop | back to summary |
|---|---|
| public void stop() Overrides ch. Implements ch.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | run()
Overrides java. Implements java. |
| Worker | back to summary |
|---|---|
| pack-priv Worker() | |
| run | back to summary |
|---|---|
| public void run() Overrides java. Implements java. Doc from java. This method is run by the thread when it executes. Subclasses of This method is not intended to be invoked directly. If this thread is a
platform thread created with a | |