From 791840ef10ecb9f25b4c3b97eacbf848bf75a261 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Wed, 24 Apr 2013 12:44:51 +0000
Subject: [PATCH] Replication Cleanup.
---
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplayThread.java | 24 ++----------------------
1 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplayThread.java b/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplayThread.java
index cb24c37..1304346 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplayThread.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplayThread.java
@@ -23,7 +23,7 @@
*
*
* Copyright 2006-2008 Sun Microsystems, Inc.
- * Portions Copyright 2011 ForgeRock AS
+ * Portions Copyright 2011-2013 ForgeRock AS
*/
package org.opends.server.replication.plugin;
import org.opends.server.replication.protocol.LDAPUpdateMsg;
@@ -57,7 +57,6 @@
private final BlockingQueue<UpdateToReplay> updateToReplayQueue;
private volatile boolean shutdown = false;
- private volatile boolean done = false;
private static int count = 0;
/**
@@ -91,12 +90,11 @@
TRACER.debugInfo("Replication Replay thread starting.");
}
- UpdateToReplay updateToreplay = null;
-
while (!shutdown)
{
try
{
+ UpdateToReplay updateToreplay;
// Loop getting an updateToReplayQueue from the update message queue and
// replaying matching changes
while ( (!shutdown) &&
@@ -119,27 +117,9 @@
logError(message);
}
}
- done = true;
if (debugEnabled())
{
TRACER.debugInfo("Replication Replay thread stopping.");
}
}
-
- /**
- * Wait for the completion of this thread.
- */
- public void waitForShutdown()
- {
- try
- {
- while ((done == false) && (this.isAlive()))
- {
- Thread.sleep(50);
- }
- } catch (InterruptedException e)
- {
- // exit the loop if this thread is interrupted.
- }
- }
}
--
Gitblit v1.10.0