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

Jean-Noel Rouvignac
09.45.2014 473e06f2b7f0c9c57ce90c4ef5b8347bb0c13adf
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, January 9, 2014 11:45 +0100
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, January 9, 2014 11:45 +0100
commit473e06f2b7f0c9c57ce90c4ef5b8347bb0c13adf
tree a5b11ef09020da9d633cabe6617e0be0b4bfd427 tree | zip | gz
parent cb1bb5d131addd27e2927ec90cc572a8c4d40f80 view | diff
Front-port of r10103,10105,10113.

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().
Made ieContext private and used an AtomicReference for it + In acquireIEContext() and releaseIEContext(), removed now useless synchronized keyword.
In acquireIEContext(), returned the created IEContext + changed all client code to assign a variable from the result.

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().
Called ReplicationDomain.getImportExportContext().
5 files modified
718 ■■■■ changed files
opendj3-server-dev/src/server/org/opends/server/replication/plugin/FractionalLDIFImportPlugin.java 127 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java 120 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/service/ReplicationDomain.java 364 ●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/service/ReplicationMonitor.java 25 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/service/ReplicationDomainTest.java 82 ●●●●● diff | view | raw | blame | history