|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.loggers.AsyncronousTextWriter
public class AsyncronousTextWriter
A Text Writer which writes log records asynchronously to character-based stream.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.opends.server.loggers.TextWriter |
---|
TextWriter.STDERR, TextWriter.STDOUT, TextWriter.STREAM |
Constructor Summary | |
---|---|
AsyncronousTextWriter(java.lang.String name,
int capacity,
boolean autoFlush,
TextWriter writer)
Construct a new AsyncronousTextWriter wrapper. |
Method Summary | |
---|---|
void |
flush()
Flushes any buffered contents of the output stream. |
long |
getBytesWritten()
Retrieves the number of bytes written by this writer. |
java.lang.String |
getShutdownListenerName()
Retrieves the human-readable name for this shutdown listener. |
TextWriter |
getWrappedWriter()
Retrieves the wrapped writer. |
void |
processServerShutdown(Message reason)
Indicates that the Directory Server has received a request to stop running and that this shutdown listener should take any action necessary to prepare for it. |
void |
setAutoFlush(boolean autoFlush)
Set the auto flush setting for this writer. |
void |
shutdown()
Releases any resources held by the writer. |
void |
shutdown(boolean shutdownWrapped)
Releases any resources held by the writer. |
void |
writeRecord(java.lang.String record)
Write the log record asyncronously. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AsyncronousTextWriter(java.lang.String name, int capacity, boolean autoFlush, TextWriter writer)
name
- the name of the thread.capacity
- the size of the queue before it gets flushed.autoFlush
- indicates if the underlying writer should be flushed
after the queue is flushed.writer
- a character stream used for output.Method Detail |
---|
public void writeRecord(java.lang.String record)
writeRecord
in interface TextWriter
record
- the log record to write.public void flush()
flush
in interface TextWriter
public long getBytesWritten()
getBytesWritten
in interface TextWriter
public TextWriter getWrappedWriter()
public java.lang.String getShutdownListenerName()
getShutdownListenerName
in interface ServerShutdownListener
public void processServerShutdown(Message reason)
processServerShutdown
in interface ServerShutdownListener
reason
- The human-readable reason for the shutdown.public void shutdown()
shutdown
in interface TextWriter
public void shutdown(boolean shutdownWrapped)
shutdownWrapped
- If the wrapped writer should be closed as well.public void setAutoFlush(boolean autoFlush)
autoFlush
- If the writer should flush the buffer after every line.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |