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

Jean-Noel Rouvignac
18.17.2013 0a9135e3444bbefde6188f456b9c9772a816096d
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Wednesday, September 18, 2013 17:17 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Wednesday, September 18, 2013 17:17 +0200
commit0a9135e3444bbefde6188f456b9c9772a816096d
tree 28b1f414d5f741c11b2d0c0afb4dd03bd3d673da tree | zip | gz
parent a8437427e823fb6d10efd71d79c49f6a4c7f70c4 view | diff
OPENDJ-1116 Introduce abstraction for the changelog DB


In replication converted the use of String for baseDN to use actual DNs.

By looking at the code, I am a bit afraid that some paths in the code were doing DN.equals(String) or vice-versa. Problem is that the current changes might change the behaviour of these paths. One example I spotted is in LDAPReplicationDomain.isSolveConflict().


LDAPReplicationDomain.java:
Removed fields serverId and baseDn already held in parent class + Used getServerId(), getBaseDN() and getBaseDNString() + moved getBaseDN() to ReplicationDomain.

ReplicationDomain.java:
Moved getBaseDN() here from LDAPReplicationDomain.


ReplicationServer.java:
In getECLChangeNumberLimits(), removed unnecessary code parsing a String. Now, the code will not throw a DirectoryException when the cookie cannot be parsed. I do not think this is a problem since the result of the parsing was never used anyway.

ReplicationBroker.java:
In performPhaseOneHandshake(), used StaticUtils.close().
In performECLPhaseTwoHandshake(), changed return type to void.

*.java:
Converted baseDNs from String type to DN type.
Renamed a few getBaseDn() to getBaseDN().

*Test.java:
Removed useless try / catch / fail test anti patterns.
Changed some fake DNs to have DN-valid syntaxes.
38 files modified
1866 ■■■■ changed files
opends/src/server/org/opends/server/replication/common/MultiDomainServerState.java 32 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java 190 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ChangelogState.java 27 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/DataServerHandler.java 13 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ECLServerHandler.java 43 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/LightweightServerHandler.java 3 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/MessageHandler.java 23 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/MonitoringPublisher.java 4 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationBackend.java 15 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationDomainMonitor.java 13 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServer.java 73 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java 125 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java 14 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/StatusAnalyzer.java 4 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/api/CNIndexRecord.java 7 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/api/ChangeNumberIndexDB.java 4 ●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/api/ChangelogDB.java 67 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/je/DbHandler.java 24 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDB.java 3 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNData.java 9 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDbHandler.java 18 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java 82 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/je/ReplicationDB.java 24 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/je/ReplicationDbEnv.java 72 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/ReplicationBroker.java 166 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/ReplicationDomain.java 82 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/GenerationIdTest.java 385 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java 37 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java 97 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/FractionalReplicationTest.java 10 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/StateMachineTest.java 14 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/AssuredReplicationServerTest.java 5 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ExternalChangeLogTest.java 125 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/changelog/je/DbHandlerTest.java 9 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/changelog/je/DraftCNDbHandlerTest.java 16 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/FakeReplicationDomain.java 15 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/FakeStressReplicationDomain.java 3 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/ReplicationDomainTest.java 13 ●●●● diff | view | raw | blame | history