From 26ff1f0755680cbce7b5bdb136750b2b1bc9e4ed Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Fri, 10 Nov 2006 08:05:56 +0000
Subject: [PATCH] issue 508 These changes implement a window mechanism in the sycnhronization protocol.
---
opends/src/server/org/opends/server/changelog/DbHandler.java | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/opends/src/server/org/opends/server/changelog/DbHandler.java b/opends/src/server/org/opends/server/changelog/DbHandler.java
index 45468b2..593b868 100644
--- a/opends/src/server/org/opends/server/changelog/DbHandler.java
+++ b/opends/src/server/org/opends/server/changelog/DbHandler.java
@@ -87,13 +87,17 @@
*
* @param id Identifier of the DB.
* @param baseDn of the DB.
+ * @param changelog the Changelog that creates this dbHandler.
+ * @param dbenv the Database Env to use to create the Changelog DB.
* @throws DatabaseException If a database problem happened
*/
- public DbHandler(short id, DN baseDn) throws DatabaseException
+ public DbHandler(short id, DN baseDn, Changelog changelog,
+ ChangelogDbEnv dbenv)
+ throws DatabaseException
{
this.serverId = id;
this.baseDn = baseDn;
- db = new ChangelogDB(id, baseDn);
+ db = new ChangelogDB(id, baseDn, changelog, dbenv);
firstChange = db.readFirstChange();
lastChange = db.readLastChange();
thread = new DirectoryThread(this, "changelog db " + id + " " + baseDn);
@@ -245,6 +249,10 @@
{}
}
}
+
+ while (msgQueue.size() != 0)
+ flush();
+
db.shutdown();
}
--
Gitblit v1.10.0