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() |
protected void |
doPublish(ExtLogRecord record)
Do the actual work of publication; the record will have been filtered already.
|
void |
flush() |
AsyncHandler.OverflowAction |
getOverflowAction()
Get the overflow action.
|
void |
setOverflowAction(AsyncHandler.OverflowAction overflowAction)
Set the overflow action.
|
addHandler, checkAccess, clearHandlers, getHandlers, isAutoFlush, publish, publish, removeHandler, setAutoFlush, setHandlers
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
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 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 flush()
public void close() throws SecurityException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Handler
SecurityException
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.