public class AsyncHandler extends ExtHandler
Modifier and Type | Class and Description |
---|---|
static class |
AsyncHandler.OverflowAction |
handlers, handlersUpdater
Constructor and Description |
---|
AsyncHandler()
Construct a new instance.
|
AsyncHandler(int queueLength)
Construct a new instance.
|
AsyncHandler(int queueLength,
ThreadFactory threadFactory)
Construct a new instance.
|
AsyncHandler(ThreadFactory threadFactory)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close all child handlers.
|
protected void |
doPublish(ExtLogRecord record)
Do the actual work of publication; the record will have been filtered already.
|
AsyncHandler.OverflowAction |
getOverflowAction()
Get the overflow action.
|
int |
getQueueLength()
The full size of the queue.
|
void |
setOverflowAction(AsyncHandler.OverflowAction overflowAction)
Set the overflow action.
|
addHandler, checkAccess, checkAccess, clearHandlers, disableAccess, enableAccess, flush, getHandlers, isAutoFlush, isEnabled, protect, publish, publish, removeHandler, setAutoFlush, setEnabled, setEncoding, setErrorManager, setFilter, setFormatter, setHandlers, setLevel, unprotect
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError
public AsyncHandler(int queueLength, ThreadFactory threadFactory)
queueLength
- the queue lengththreadFactory
- the thread factory to use to construct the handler threadpublic AsyncHandler(ThreadFactory threadFactory)
threadFactory
- the thread factory to use to construct the handler threadpublic AsyncHandler(int queueLength)
queueLength
- the queue lengthpublic AsyncHandler()
public int getQueueLength()
public AsyncHandler.OverflowAction getOverflowAction()
public void setOverflowAction(AsyncHandler.OverflowAction overflowAction)
overflowAction
- the overflow actionprotected void doPublish(ExtLogRecord record)
autoFlush
property is set to true
; if this behavior is to be
preserved in a subclass then this method should be called after the record is physically written.doPublish
in class ExtHandler
record
- the log record to publishpublic void close() throws SecurityException
close
in interface Closeable
close
in interface AutoCloseable
close
in class ExtHandler
SecurityException
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.