}
catch (IOException e)
{
Message message = ERR_COULD_NOT_CLOSE_THE_SOCKET.get(e.toString());
logError(message);
new ConfigChangeResult(DirectoryServer.getServerErrorResultCode(),
false);
}
catch (InterruptedException e)
{
Message message = ERR_COULD_NOT_STOP_LISTEN_THREAD.get(e.toString());
logError(message);
new ConfigChangeResult(DirectoryServer.getServerErrorResultCode(),
false);
}
}
// Update threshold value for status analyzers (stop them if requested
// value is 0)
if (degradedStatusThreshold != configuration.getDegradedStatusThreshold())
{
int oldThresholdValue = degradedStatusThreshold;
degradedStatusThreshold = configuration.getDegradedStatusThreshold();
for(ReplicationServerDomain rsd : baseDNs.values())
{
if (degradedStatusThreshold == 0)
{
// Requested to stop analyzers
rsd.stopStatusAnalyzer();
} else if (rsd.isRunningStatusAnalyzer())
{
// Update the threshold value for this running analyzer
rsd.updateStatusAnalyzer(degradedStatusThreshold);
} else if (oldThresholdValue == 0)
{
// Requested to start analyzers with provided threshold value
if (rsd.getConnectedDSs().size() > 0)
rsd.startStatusAnalyzer();
}
}
}
// Update period value for monitoring publishers (stop them if requested
// value is 0)
if (monitoringPublisherPeriod != configuration.getMonitoringPeriod())
{
long oldMonitoringPeriod = monitoringPublisherPeriod;
monitoringPublisherPeriod = configuration.getMonitoringPeriod();
for(ReplicationServerDomain rsd : baseDNs.values())
{
if (monitoringPublisherPeriod == 0L)
{
// Requested to stop monitoring publishers
rsd.stopMonitoringPublisher();
} else if (rsd.isRunningMonitoringPublisher())
{
// Update the threshold value for this running monitoring publisher
rsd.updateMonitoringPublisher(monitoringPublisherPeriod);
} else if (oldMonitoringPeriod == 0L)
{
// Requested to start monitoring publishers with provided period value
if ( (rsd.getConnectedDSs().size() > 0) ||
(rsd.getConnectedRSs().size() > 0) )
rsd.startMonitoringPublisher();
}
}
}
// Changed the group id ?
byte newGroupId = (byte)configuration.getGroupId();
if (newGroupId != groupId)
{
groupId = newGroupId;
// Have a new group id: Disconnect every servers.
for (ReplicationServerDomain replicationServerDomain : baseDNs.values())
{
replicationServerDomain.stopAllServers(true);
}
}
// Set a potential new weight
if (weight != configuration.getWeight())
{
weight = configuration.getWeight();
// Broadcast the new weight the the whole topology. This will make some
// DSs reconnect (if needed) to other RSs according to the new weight of
// this RS.
broadcastConfigChange();
}
if ((configuration.getReplicationDBDirectory() != null) &&
(!dbDirname.equals(configuration.getReplicationDBDirectory())))
{
return new ConfigChangeResult(ResultCode.SUCCESS, true);
}
return new ConfigChangeResult(ResultCode.SUCCESS, false);
}