public class ReplicationConfig extends Object
Constructor and Description |
---|
ReplicationConfig()
Default constructor.
|
ReplicationConfig(ReplicationConfig config)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
static ReplicationConfig |
createReplicationConfigFromJSON(net.sf.json.JSONObject formData)
Create a ReplicationConfig object from JSON.
|
String |
getDefaultSlaveId()
The id of the default slave to be selected in job config.
|
GerritSlave |
getGerritSlave(String id,
boolean defaultSlave)
Get a specific Gerrit slave using its id.
|
List<GerritSlave> |
getGerritSlaves()
Get the list of GerritSlave objects.
|
boolean |
isEnableReplication()
If we enable waiting on replication events.
|
boolean |
isEnableSlaveSelectionInJobs()
Whether slave selection in enabled in job config.
|
public ReplicationConfig(ReplicationConfig config)
config
- the ReplicationConfig object to be copied, never null.public ReplicationConfig()
public boolean isEnableReplication()
public List<GerritSlave> getGerritSlaves()
public boolean isEnableSlaveSelectionInJobs()
public String getDefaultSlaveId()
public GerritSlave getGerritSlave(String id, boolean defaultSlave)
id
- the id of the slave.defaultSlave
- if true, will return the default slave when specified id do not exists.public static ReplicationConfig createReplicationConfigFromJSON(net.sf.json.JSONObject formData)
formData
- the JSON data.Copyright © 2016–2017. All rights reserved.