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

Jean-Noel Rouvignac
19.32.2013 d51eba690902925cd89024bef2800e2232123da6
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, August 19, 2013 12:32 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, August 19, 2013 12:32 +0200
commitd51eba690902925cd89024bef2800e2232123da6
tree 457864d2d5898e8f34cf3e8e2537305ad4466afb tree | zip | gz
parent fa19a762e9cada15cdb45d409fa3607c930812b8 view | diff
Enforced ReplicationServerDomain responsibilities by increasing encapsulation.


ReplicationServer.java:
Added getConnectedRSUrls(), that aggregates code from ReplicationServerDomain.getChangelogs() and from runConnect().
In applyConfigurationChange(), moved code to ReplicationServerDomain for better encapsulation.

ReplicationServerDomain.java:
Renamed checkForDuplicateDS() into isAlreadyConnectedToDS().
Renamed checkForDuplicateRS() into isAlreadyConnectedToRS().
Moved getChangelogs() to ReplicationServer.
Made several methods private to reduce coupling and enforce class responsibilities.
Generalized the use of isRunningStatusAnalyzer() and isRunningMonitoringPublisher() to improved readability.
Inlined updateStatusAnalyzer() and updateMonitoringPublisher().
Moved code from ... to create updateDegradedStatusThreshold() and updateMonitoringPeriod().
In stopReplicationServers(), renamed parameter for increased readability.

DataServerHandler.java:
Inlined createStatusAnalyzer().

ServerHandler.java, ReplicationServerHandler.java:
Inlined createMonitoringPublisher().
In lockDomain(), removed useless else.
Code cleanup.

StatusAnalyzer.java:
Extracted isInterrupted().
Extracted getMessage() to make error messages more conherent.
6 files modified
709 ■■■■■ changed files
opends/src/server/org/opends/server/replication/server/DataServerHandler.java 19 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServer.java 69 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java 255 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java 33 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ServerHandler.java 234 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/StatusAnalyzer.java 99 ●●●● diff | view | raw | blame | history