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

Jean-Noel Rouvignac
25.39.2013 5b2a1411644980f10b6d826155752f85e40bdd78
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Wednesday, September 25, 2013 10:39 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Wednesday, September 25, 2013 10:39 +0200
commit5b2a1411644980f10b6d826155752f85e40bdd78
tree d15b8cb5a03bf2a784d27badddb208e1478820a2 tree | zip | gz
parent 60f5dfd7eaa64aa931033c0e5266391ecbbc96fa view | diff
OPENDJ-1134 (CR-2355) Introduce a class in replication for encapsulating host+port combinations

Now the replication code uses HostPort class for comparisons instead of "host:port" Strings.
Changed all the HostPort variable/parameter names to *Address instead of *URL. Left all the relevant String variable/parameter names to *URL.


HostPort.java:
Removed LocalAddress(String), not used anymore.
Moved getLocalAddress() here from ReplicationServer.
Created localAddress() static method.
Extracted method toInetSocketAddress() and moved it here.

ReplicationServer.java:
Created converting method toHostPorts() + used it everywhere replicationServerUrls was accessed.
Replaced getNormalizedLocalURL() and normalizeServerURL() with simply calling HostPort.localAddress() and HostPort.valueOf().
In getConnectedRSUrls(), changed return type from Set<String> to Set<HostPort>.
In connect() and disconnectRemovedReplicationServers(), used HostPort as a parameter instead of String.

ReplicationServerDomain.java:
In stopReplicationServers(), used HostPort as a parameter instead of String.

ReplicationServerHandler.java:
Extracted method toServerAddressURL().

ReplicationBroker.java:
Consequence of the change to HostPort.


ReplSessionSecurity.java:
In isSslEncryption() removed unused parameter.
Used StaticUtils.close().

ReplicationServerConfiguration.xml, ReplicationServerCfgDefn.properties:
Added precisions on how to specify the "replication-server" property.

ReplicationServerDynamicConfTest.java, ReplServerFakeConfiguration.java:
Updated because this test was failing.
10 files modified
383 ■■■■■ changed files
opends/src/admin/defn/org/opends/server/admin/std/ReplicationServerConfiguration.xml 4 ●●● diff | view | raw | blame | history
opends/src/admin/messages/ReplicationServerCfgDefn.properties 2 ●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/protocol/ReplSessionSecurity.java 70 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServer.java 159 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java 10 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java 10 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/ReplicationBroker.java 24 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/types/HostPort.java 51 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplServerFakeConfiguration.java 34 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerDynamicConfTest.java 19 ●●●●● diff | view | raw | blame | history