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

Jean-Noel Rouvignac
08.30.2014 ce7ba4fce2cc6c58c094159d271d273a484d7760
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
commitce7ba4fce2cc6c58c094159d271d273a484d7760
tree ede59145508cf167bb1495c15b106d838e4a9de9 tree | zip | gz
parent ceb46ea1d4a573acb511efbb3fe37c05c8de36ab 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
opendj-sdk/opends/src/server/org/opends/server/replication/common/DSInfo.java 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/FractionalLDIFImportPlugin.java 129 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java 126 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/protocol/StartSessionMsg.java 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/service/ReplicationDomain.java 321 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/service/ReplicationMonitor.java 25 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/DummyReplicationDomain.java 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/FractionalReplicationTest.java 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/TopologyViewTest.java 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/AssuredReplicationServerTest.java 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/FakeReplicationDomain.java 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/FakeStressReplicationDomain.java 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/service/ReplicationDomainTest.java 73 ●●●● diff | view | raw | blame | history