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

abobrov
09.52.2009 9a9c330961511a0747780b3481e7008fd6e99271
opendj-sdk/opends/src/server/org/opends/server/loggers/TextAccessLogPublisher.java
@@ -159,6 +159,10 @@
      {
        currentWriter = ((AsyncronousTextWriter) writer).getWrappedWriter();
      }
      else if (writer instanceof ParallelTextWriter)
      {
        currentWriter = ((ParallelTextWriter) writer).getWrappedWriter();
      }
      else
      {
        currentWriter = writer;
@@ -196,6 +200,14 @@
          asyncWriter.shutdown(false);
        }
        if (writer instanceof ParallelTextWriter && !config.isAsynchronous())
        {
          // The asynchronous setting is being turned off.
          ParallelTextWriter asyncWriter = ((ParallelTextWriter) writer);
          writer = mfWriter;
          asyncWriter.shutdown(false);
        }
        if (!(writer instanceof AsyncronousTextWriter)
            && config.isAsynchronous())
        {
@@ -206,6 +218,16 @@
          writer = asyncWriter;
        }
        if (!(writer instanceof ParallelTextWriter)
            && config.isAsynchronous())
        {
          // The asynchronous setting is being turned on.
          ParallelTextWriter asyncWriter = new ParallelTextWriter(
              "Parallel Text Writer for " + config.dn().toNormalizedString(),
              config.isAutoFlush(), mfWriter);
          writer = asyncWriter;
        }
        if ((currentConfig.isAsynchronous() && config.isAsynchronous())
            && (currentConfig.getQueueSize() != config.getQueueSize()))
        {
@@ -303,9 +325,18 @@
      if (config.isAsynchronous())
      {
        this.writer = new AsyncronousTextWriter("Asyncronous Text Writer for "
            + config.dn().toNormalizedString(), config.getQueueSize(), config
            .isAutoFlush(), writer);
        if (config.getQueueSize() > 0)
        {
          this.writer = new AsyncronousTextWriter(
            "Asyncronous Text Writer for " + config.dn().toNormalizedString(),
            config.getQueueSize(), config.isAutoFlush(), writer);
        }
        else
        {
          this.writer = new ParallelTextWriter(
            "Parallel Text Writer for " + config.dn().toNormalizedString(),
            config.isAutoFlush(), writer);
        }
      }
      else
      {