| | |
| | | */ |
| | | package org.opends.server.replication.server; |
| | | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.messages.ReplicationMessages.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.io.IOException; |
| | | import java.net.*; |
| | | import java.util.*; |
| | |
| | | import org.opends.server.replication.service.DSRSShutdownSync; |
| | | import org.opends.server.types.*; |
| | | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.messages.ReplicationMessages.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | /** |
| | | * ReplicationServer Listener. This singleton is the main object of the |
| | | * replication server. It waits for the incoming connections and create listener |
| | |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | ReplicationServerCfg configuration) |
| | | { |
| | | ResultCode resultCode = ResultCode.SUCCESS; |
| | | boolean adminActionRequired = false; |
| | | final ConfigChangeResult ccr = new ConfigChangeResult(); |
| | | |
| | | // Some of those properties change don't need specific code. |
| | | // They will be applied for next connections. Some others have immediate |
| | | // effect |
| | | // They will be applied for next connections. Some others have immediate effect |
| | | final Set<HostPort> oldRSAddresses = getConfiguredRSAddresses(); |
| | | |
| | | final ReplicationServerCfg oldConfig = this.config; |
| | |
| | | catch (ChangelogException e) |
| | | { |
| | | logger.traceException(e); |
| | | resultCode = ResultCode.OPERATIONS_ERROR; |
| | | ccr.setResultCode(ResultCode.OPERATIONS_ERROR); |
| | | } |
| | | } |
| | | |
| | |
| | | final String newDir = config.getReplicationDBDirectory(); |
| | | if (newDir != null && !newDir.equals(oldConfig.getReplicationDBDirectory())) |
| | | { |
| | | adminActionRequired = true; |
| | | ccr.setAdminActionRequired(true); |
| | | } |
| | | return new ConfigChangeResult(resultCode, adminActionRequired); |
| | | return ccr; |
| | | } |
| | | |
| | | /** |