public final class ReplicationServerSetup extends Setup<ReplicationServerSetup>
The server to setup is a standalone RS. It can either be the first server in a replication topology (default behaviour):
ReplicationServerSetup.newReplicationServerSetup() .replicationPort(8989) .secureConnections() .join(asFirstServerInTopology());Or it can join an existing replication topology:
ReplicationServerSetup.newReplicationServerSetup() .replicationPort(8989) .secureConnections() .join(existingTopology() .replicationServer("openam.example.com", 8900) .trustStore(useBlindTrust()) .replicateDomainBaseDns("dc=com", "dc=net"));Note that all mandatory options belonging to the parent
Setup
class (e.g the administration connector port)
must be added to make the example above working.Modifier and Type | Class and Description |
---|---|
static class |
ReplicationServerSetup.ExistingTopology
Represents the data needed by the new RS to join a replication topology.
|
static class |
ReplicationServerSetup.Topology
Represents the replication topology that the new replication server should join.
|
JVM_TRUST_MANAGER_PROVIDER
Modifier and Type | Method and Description |
---|---|
static ReplicationServerSetup.Topology |
asFirstServerInTopology()
Specifies that the new RS will be the first server in the replication topology
(i.e waiting for other directory/replication servers to contact it).
|
static ReplicationServerSetup.ExistingTopology |
existingTopology()
Specifies that the new RS should join an existing replication topology.
|
ReplicationServerSetup |
join(ReplicationServerSetup.Topology topology)
Specifies how the new RS should join the replication topology.
|
static ReplicationServerSetup |
newReplicationServerSetup()
Creates a new
ReplicationServerSetup object to start adding setup parameters. |
ReplicationServerSetup |
replicationPort(int replicationPort)
Specifies the replication port of the instance to setup.
|
ReplicationServerSetup |
secureConnections(boolean secureConnections)
Specifies whether the communication through the replication port should be secured.
|
ReplicationServerSetup |
startServer(boolean startServer)
Specifies whether the server should start during the setup process.
|
adminPort, checkPortAvailability, console, disableHttpConnectionHandler, disableHttpSecureConnectionHandler, enableWindowsService, fullyQualifiedHostName, httpPort, httpSecurePort, installDirectory, installDirectory, instanceDirectory, instanceDirectory, productionModeEnabled, rootUserDn, rootUserDn, rootUserPassword, secureWith, setup
public static ReplicationServerSetup.Topology asFirstServerInTopology()
The new server will be configured as a standalone RS.
Admin data LDIF backend will be initialized and the replication global administrator will be created.
This user has fixed admin UID and its password will be the same password as
the root user password of the new RS (Setup.rootUserPassword(String)
.
ReplicationServerSetup.Topology
object to use if the new RS should wait for other directory/replication servers
to contact it (i.e is the first server in its replication topology).public static ReplicationServerSetup.ExistingTopology existingTopology() throws com.forgerock.opendj.cli.ArgumentException
The following elements can be configured:
The RS is the topology entry point. It can be set using either
ReplicationServerSetup.ExistingTopology.replicationServer(String)
or
ReplicationServerSetup.ExistingTopology.replicationServer(String, int)
.
It must be online during the new RS setup.
Setup will connect to the RS by using the admin port,
thus the method to trust the server certificate must be specified using
(ExistingTopology#trustStore(TrustStore)
.
A replication topology has a global administrator user which is replicated. The new RS user root bind password must be the same as the topology global administrator bind password.
The new RS will be added to the configuration of every replicated domain in the topology.
To filter out some domains, specific base DNs could be specified using
ReplicationServerSetup.ExistingTopology.replicateDomainBaseDns(Dn...)
,
ReplicationServerSetup.ExistingTopology.replicateDomainBaseDns(Collection)
or
ReplicationServerSetup.ExistingTopology.replicateDomainBaseDns(String...)
methods.
ReplicationServerSetup.ExistingTopology
object to continue building it.com.forgerock.opendj.cli.ArgumentException
- If the provided adminPort value is invalidpublic static ReplicationServerSetup newReplicationServerSetup()
ReplicationServerSetup
object to start adding setup parameters.ReplicationServerSetup
object to start adding setup parameters.public ReplicationServerSetup secureConnections(boolean secureConnections)
Communications wont be secured by default, unless the production mode has been enabled.
secureConnections
- Whether the communication through the replication port should be secured.ReplicationServerSetup
objectpublic ReplicationServerSetup join(ReplicationServerSetup.Topology topology) throws com.forgerock.opendj.cli.ArgumentException
By default, no replication topology will be joined and the new server will be setup as a standalone RS waiting for other replication/directory servers to contact it.
topology
- An object representing the topology of the replication setup.ReplicationServerSetup
objectcom.forgerock.opendj.cli.ArgumentException
- If the server is required to not be started during the setup whereas the chosen topology
needs it to be started.asFirstServerInTopology()
,
existingTopology()
public ReplicationServerSetup replicationPort(int replicationPort) throws com.forgerock.opendj.cli.ArgumentException
This method must be called before the Setup.setup()
method is called
since the administration port is a mandatory parameter.
replicationPort
- The replication port numberReplicationServerSetup
objectcom.forgerock.opendj.cli.ArgumentException
- If the provided port number is invalid.
This exception can be thrown if the port is already in use,
this verification can be disabled using Setup.checkPortAvailability(boolean)
.public ReplicationServerSetup startServer(boolean startServer) throws com.forgerock.opendj.cli.ArgumentException
Setup
This attribute is true
by default
Note that depending on the setup options chosen, this parameter may be mandatory
startServer
in class Setup<ReplicationServerSetup>
startServer
- false
if the server should not start during the setup processSetup
objectcom.forgerock.opendj.cli.ArgumentException
- If the provided startServer
parameter is false
and the server must be started.Copyright © 2010–2017 ForgeRock AS. All rights reserved.