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

Jean-Noel Rouvignac
08.30.2014 e33ecc4dd66d4c514cd7ad52d348a0be63a7f1eb
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Wednesday, January 8, 2014 15:30 +0100
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Wednesday, January 8, 2014 15:30 +0100
commite33ecc4dd66d4c514cd7ad52d348a0be63a7f1eb
tree 5b29afbf087686a206669144fc47d2b461f2c47c tree | zip | gz
parent bfdf682424bf2b33530ca240e653865f04b33e8f view | diff
Increased encapsulation of ReplicationDomain.IEContext + moved more behaviour to it.
Reduced members' visibilities in LDAPReplicationDomain + removed several methods.


ReplicationDomain.java:
Do not access the IEContext field several times in one method in case it gets updated in the middle, instead accessed it once at the top of a method and passed it down private method calls.
Moved importInProgress(), getTotalEntryCount(), getLeftEntryCount() to IEContext class.
Added getImportExportContext().

LDAPReplicationDomain.java:
Reduced visibility of many methods.
Removed followImport field + setFollowImport() which can be calculated from importErrorMessageId + added and used isFollowImport() instead.
Replaced calls to "retrievesBackend(getBaseDN())" with getBackend() + inlined retrievesBackend().
Called getImportExportContext() to access the IEContext.

FractionalLDIFImportPlugin.java:
Consequence of removing LDAPReplicationDomain.setFollowImport().
In doLDIFImport(), factorized code between branches of an if statement + extracted method isNotEmpty().
In flushFractionalConfigIntoEntry(), used StaticUtils.collectionToString() + extracted method add()

ReplicationMonitor.java:
In getMonitorData(), simplified the code.

ReplicationDomainTest.java:
Extracted methods waitEndExport(), assertExportSucessful(), buildExportedData().

*.java:
Updated copyright years for r10098.
13 files modified
690 ■■■■■ changed files
opends/src/server/org/opends/server/replication/common/DSInfo.java 2 ●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/FractionalLDIFImportPlugin.java 129 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java 126 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/protocol/StartSessionMsg.java 2 ●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/ReplicationDomain.java 321 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/ReplicationMonitor.java 25 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/DummyReplicationDomain.java 2 ●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/FractionalReplicationTest.java 2 ●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/TopologyViewTest.java 2 ●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/AssuredReplicationServerTest.java 2 ●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/FakeReplicationDomain.java 2 ●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/FakeStressReplicationDomain.java 2 ●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/ReplicationDomainTest.java 73 ●●●● diff | view | raw | blame | history