E
- public class AsyncAppenderBase<E> extends UnsynchronizedAppenderBase<E> implements AppenderAttachable<E>
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 | Field and Description |
---|---|
static int |
DEFAULT_MAX_FLUSH_TIME
The default maximum queue flush time allowed during appender stop.
|
static int |
DEFAULT_QUEUE_SIZE
The default buffer size.
|
Constructor and Description |
---|
AsyncAppenderBase() |
Modifier and Type | Method and Description |
---|---|
void |
addAppender(Appender<E> newAppender)
Add an appender.
|
void |
detachAndStopAllAppenders()
Detach and processPriorToRemoval all previously added appenders.
|
boolean |
detachAppender(Appender<E> eAppender)
Detach the appender passed as parameter from the list of appenders.
|
boolean |
detachAppender(java.lang.String name)
Detach the appender with the name passed as parameter from the list of
appenders.
|
Appender<E> |
getAppender(java.lang.String name)
Get an appender by name.
|
int |
getDiscardingThreshold() |
int |
getMaxFlushTime() |
int |
getNumberOfElementsInQueue()
Returns the number of elements currently in the blocking queue.
|
int |
getQueueSize() |
int |
getRemainingCapacity()
The remaining capacity available in the blocking queue.
|
boolean |
isAttached(Appender<E> eAppender)
Returns
true if the specified appender is in list of
attached attached, false otherwise. |
boolean |
isNeverBlock() |
java.util.Iterator<Appender<E>> |
iteratorForAppenders()
Get an iterator for appenders contained in the parent object.
|
void |
setDiscardingThreshold(int discardingThreshold) |
void |
setMaxFlushTime(int maxFlushTime) |
void |
setNeverBlock(boolean neverBlock) |
void |
setQueueSize(int queueSize) |
void |
start() |
void |
stop() |
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
public static final int DEFAULT_QUEUE_SIZE
public static final int DEFAULT_MAX_FLUSH_TIME
public void start()
start
in interface LifeCycle
start
in class UnsynchronizedAppenderBase<E>
public void stop()
stop
in interface LifeCycle
stop
in class UnsynchronizedAppenderBase<E>
public int getQueueSize()
public void setQueueSize(int queueSize)
public int getDiscardingThreshold()
public void setDiscardingThreshold(int discardingThreshold)
public int getMaxFlushTime()
public void setMaxFlushTime(int maxFlushTime)
public int getNumberOfElementsInQueue()
public void setNeverBlock(boolean neverBlock)
public boolean isNeverBlock()
public int getRemainingCapacity()
java.util.concurrent.BlockingQueue#remainingCapacity()}
public void addAppender(Appender<E> newAppender)
AppenderAttachable
addAppender
in interface AppenderAttachable<E>
public java.util.Iterator<Appender<E>> iteratorForAppenders()
AppenderAttachable
iteratorForAppenders
in interface AppenderAttachable<E>
public Appender<E> getAppender(java.lang.String name)
AppenderAttachable
getAppender
in interface AppenderAttachable<E>
public boolean isAttached(Appender<E> eAppender)
AppenderAttachable
true
if the specified appender is in list of
attached attached, false
otherwise.isAttached
in interface AppenderAttachable<E>
public void detachAndStopAllAppenders()
AppenderAttachable
detachAndStopAllAppenders
in interface AppenderAttachable<E>
public boolean detachAppender(Appender<E> eAppender)
AppenderAttachable
detachAppender
in interface AppenderAttachable<E>
public boolean detachAppender(java.lang.String name)
AppenderAttachable
detachAppender
in interface AppenderAttachable<E>
Copyright © 2010 - 2020 Adobe. All Rights Reserved