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

Jean-Noel Rouvignac
20.08.2014 1c59d6c7d4e33c5b88fbe0692c1d50c0eab74c4a
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, February 20, 2014 15:08 +0100
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, February 20, 2014 15:08 +0100
commit1c59d6c7d4e33c5b88fbe0692c1d50c0eab74c4a
tree 8d328190f5311153b16ae6c019aec137be1b15c6 tree | zip | gz
parent f8312ee683a16eac82ef43a9c4144162100d7658 view | diff
OPENDJ-1271 (CR-3008) dsreplication pre-external-initialization task fails with STOPPED_BY_ERROR


Improved design for Replication Topology


ReplicationBroker.java + *Test.java:
Extracted the Topology class to encapsulate the dsList and replicationServerInfos fields + atomically set it via an AtomicReference + moved setLocallyConfiguredFlag(), isSameReplicationServerUrl(), computeConnectedDSs() to Topology class.
Created methods computeNewTopology() and topologyChange() to compute and set the new topology.
Removed generationID instance variable duplicated with the one from ReplicationDomain + updated ctor and setGenerationID().
Improved debugging messages.
Renamed getDsList() to getReplicaInfos() + changed return type from List<DSInfo> to Map<Integer, DSInfo>.
Renamed getRsList() to getRsInfos().
Extracted method toRSInfos().

ReplicationBrokerTest.java: ADDED
Added to test new ReplicationBroker.Topology class.


DSInfo.java:
Changed equals(Set<String>, Set<String>) to equals(Object, Object).
In toString(), hid the assured fields if assured replication is off.

RSInfo.java:
Renamed fields id and serverUrl to rsServerId and rsServerURL.
In toString(), relied on the compiler to generate the String.


TopologyMsg.java:
Renamed fields dsList and rsList to replicaInfos and rsInfos.
Renamed getDsList() to getReplicaInfos() + changed return type from List<DSInfo> to Map<Integer, DSInfo>.
Renamed getRsList() to getRsInfos().
Extracted methods readStrings() and writeStrings().
Code cleanup
Used javadocs


ReplicationDomain.java, replication*.properties:
Extracted class ECLIncludes to replace eclIncludesLock, eclIncludesByServer, eclIncludesAllServers, eclIncludesForDeletesByServer, eclIncludesForDeletesAllServers + moved setEclIncludes() implementation to this class + removed synchronized blocks from all the getters.
Added baseDN to ERR_INIT_NO_SUCCESS_START_FROM_SERVERS.
Inlined initializeRemote().
Removed unused initializeFromRemote().
Reduced methods visibility.
Renamed getReplicaList() to getReplicaInfos() + changed return type from List<DSInfo> to Map<Integer, DSInfo>.
Renamed getRsList() to getRsInfos().
In initializeRemote(), waitForRemoteEndOfInit(), isRemoteDSConnected() and getProtocolVersion(), simplified code.

*.java:
Consequence of the changes above.
Simplified code in a number of places, particularly in the tests.
1 files added
21 files modified
1745 ■■■■■ changed files
opendj3-server-dev/src/messages/messages/replication.properties 2 ●●● diff | view | raw | blame | history
opendj3-server-dev/src/messages/messages/replication_de.properties 3 ●●●● diff | view | raw | blame | history
opendj3-server-dev/src/messages/messages/replication_es.properties 2 ●●● diff | view | raw | blame | history
opendj3-server-dev/src/messages/messages/replication_fr.properties 2 ●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/common/DSInfo.java 13 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/common/RSInfo.java 41 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/protocol/TopologyMsg.java 252 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationServerHandler.java 6 ●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/service/ReplicationBroker.java 532 ●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/service/ReplicationDomain.java 355 ●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/service/ReplicationMonitor.java 2 ●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java 2 ●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/FractionalReplicationTest.java 8 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/HistoricalCsnOrderingTest.java 2 ●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/StateMachineTest.java 16 ●●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/TopologyViewTest.java 5 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/protocol/ProtocolCompatibilityTest.java 87 ●●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/protocol/SynchronizationMsgTest.java 4 ●●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/AssuredReplicationServerTest.java 72 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java 2 ●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/service/ReplicationBrokerTest.java 268 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/service/ReplicationDomainTest.java 69 ●●●● diff | view | raw | blame | history