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

Nicolas Capponi
28.34.2014 1d5d1a6a4a0a58d6bb4803527dacb6641c027816
opendj3-server-dev/src/server/org/opends/server/replication/server/MonitoringPublisher.java
@@ -22,18 +22,16 @@
 *
 *
 *      Copyright 2009-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2013 ForgeRock AS
 *      Portions Copyright 2011-2014 ForgeRock AS
 */
package org.opends.server.replication.server;
import java.io.IOException;
import org.opends.server.api.DirectoryThread;
import org.opends.server.loggers.debug.DebugTracer;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.opends.server.replication.protocol.MonitorMsg;
import static org.opends.server.loggers.debug.DebugLogger.*;
/**
 * This thread regularly publishes monitoring information:
 * - it sends monitoring messages regarding the direct topology (directly
@@ -45,11 +43,7 @@
 */
public class MonitoringPublisher extends DirectoryThread
{
  /**
   * The tracer object for the debug logger.
   */
  private static final DebugTracer TRACER = getTracer();
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** The replication domain we send monitoring for. */
  private final ReplicationServerDomain domain;
@@ -83,9 +77,9 @@
  @Override
  public void run()
  {
    if (debugEnabled())
    if (logger.isTraceEnabled())
    {
      TRACER.debugInfo(getMessage("Monitoring publisher starting."));
      logger.trace(getMessage("Monitoring publisher starting."));
    }
    try
@@ -127,11 +121,11 @@
    }
    catch (InterruptedException e)
    {
      TRACER.debugInfo(getMessage(
      logger.trace(getMessage(
          "Monitoring publisher has been interrupted while sleeping."));
    }
    TRACER.debugInfo(getMessage("Monitoring publisher is terminated."));
    logger.trace(getMessage("Monitoring publisher is terminated."));
  }
@@ -146,9 +140,9 @@
    {
      shutdownLock.notifyAll();
    }
    if (debugEnabled())
    if (logger.isTraceEnabled())
    {
      TRACER.debugInfo(getMessage("Shutting down monitoring publisher."));
      logger.trace(getMessage("Shutting down monitoring publisher."));
    }
  }
@@ -175,9 +169,9 @@
   */
  public void setPeriod(long period)
  {
    if (debugEnabled())
    if (logger.isTraceEnabled())
    {
      TRACER.debugInfo(getMessage(
      logger.trace(getMessage(
          "Monitoring publisher changing period value to " + period));
    }