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

Jean-Noel Rouvignac
14.57.2014 4ef1bf3f0289cb7a361407a09db7b696393cd371
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
commit4ef1bf3f0289cb7a361407a09db7b696393cd371
tree 74b100e059262003ec572649028d9d0d981442a8 tree | zip | gz
parent 8899de7b3cf2fa47c11620cd48ad4c296e6d592e 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
opendj-sdk/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java 276 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java 76 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java 59 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java 12 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexer.java 14 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java 17 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ExternalChangeLogTest.java 10 ●●●● diff | view | raw | blame | history