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

Jean-Noel Rouvignac
14.57.2014 8339e4504244448349666eda0af74e2a080913b4
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, April 14, 2014 15:57 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, April 14, 2014 15:57 +0200
commit8339e4504244448349666eda0af74e2a080913b4
tree 20ce4e9bfdf05ef6e3196f3a62aacc067812894f tree | zip | gz
parent 21d52a37a8598aaede57c7ad693013f1f5c11ccc view | diff
OPENDJ-1430 - Some changes are missing from the external changelog

Code cleanup in ECLServerHandler:
The eligibleCSN was used when the ECLServerHandler was responsible for inserting replicaDB changes into the changeNumber index DB.
To this end, the eligibleCSN was computed to provide a kind of "medium consistency point" ("kind of" because it was badly computed).
After OPENDJ-1174, it is no longer ECLServerHandler's responsibility to inserting replicaDB changes into the changeNumber index DB, so the eligibleCSN is now useless and this commit removes it.

In addition this commit enhances the toString() methods for a better readability.



ECLServerHandler.java:
Removed eligibleCSN field + refreshEligibleCSN().
Renamed computeNextEligibleMessageForDomain() to computeNextAvailableMessage() + simplified code.
In DomainContext, removed nextNonEligibleMsg field + removed isEligible(), debugInfo() and toString(CSN).
In dumpState(), made the debug string more readable.
In buildDomainContexts(), used DomainContext new ctor + extracted method newDomainContext() to build full DomainContext objects in one go + fixed a possible ConcurrentModificationException.
In DomainContext, made some fields final + added a ctor + made toString() more readable.

ReplicationServerDomain.java:
Removed getEligibleCSN() and isServerConnected(), now unused.

ReplicationServer.java:
Removed getEligibleCSN(), now unused.

ReplicationDomainDB.java, JEChangelogDB.java, ChangeNumberIndexer.java:
Removed getDomainLastAliveCSNs(), now unused.

ExternalChangeLogTest.java
Consequence of the changes above.
7 files modified
464 ■■■■ changed files
opends/src/server/org/opends/server/replication/server/ECLServerHandler.java 276 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServer.java 76 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java 59 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java 12 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexer.java 14 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java 17 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ExternalChangeLogTest.java 10 ●●●● diff | view | raw | blame | history