mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
16.53.2013 6f50a5cd07ae8e9a5f4ac5b5d373f30a2b1371da
opendj-sdk/opends/src/server/org/opends/server/loggers/AsynchronousTextWriter.java
@@ -27,8 +27,6 @@
 */
package org.opends.server.loggers;
import java.util.ArrayList;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
@@ -39,8 +37,6 @@
import org.opends.server.api.ServerShutdownListener;
import org.opends.server.core.DirectoryServer;
/**
 * A Text Writer which writes log records asynchronously to
 * character-based stream.
@@ -102,10 +98,12 @@
    {
      super(name);
    }
    /**
     * the run method of the writerThread. Run until queue is empty
     * AND we've been asked to terminate
     */
    @Override
    public void run()
    {
      ArrayList<String> drainList = new ArrayList<String>(capacity);
@@ -156,10 +154,11 @@
  }
  /**
   * Write the log record asyncronously.
   * Write the log record asynchronously.
   *
   * @param record the log record to write.
   */
  @Override
  public void writeRecord(String record)
  {
    // No writer?  Off to the bit bucket.
@@ -184,6 +183,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void flush()
  {
    writer.flush();
@@ -192,6 +192,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public long getBytesWritten()
  {
    return writer.getBytesWritten();
@@ -210,6 +211,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public String getShutdownListenerName()
  {
    return "AsynchronousTextWriter Thread " + name;
@@ -218,6 +220,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void processServerShutdown(Message reason)
  {
    // Don't shutdown the wrapped writer on server shutdown as it
@@ -229,6 +232,7 @@
  /**
   * {@inheritDoc}
   */
  @Override
  public void shutdown()
  {
    shutdown(true);