'Check to see if this host definition has changed. If it has, stop the thread and
start a new one. This assumes it is called inside of serverHostDefsLock'

def checkChangedHostDef(self, hostDef, hostDefLast):

    if (not hostDefLast):
        return
    hostKey = hostDef['hostKey']
    changed = False
    if (hostDef['ssl'] and (not hostDefLast['ssl'])):
        changed = True
    if ((not hostDef['ssl']) and hostDefLast['ssl']):
        changed = True
    if ((not self.disableProfileDataCollection) and hostDef['profiler'] and (not hostDefLast['profiler'])):
        changed = True
    if ((not self.disableProfileDataCollection) and (not hostDef['profiler']) and hostDefLast['profiler']):
        changed = True
    if ((not self.disableProfileDataCollection) and hostDef['getLogs'] and (not hostDefLast['getLogs'])):
        changed = True
    if ((not self.disableProfileDataCollection) and (not hostDef['getLogs']) and hostDefLast['getLogs']):
        changed = True
    if (hostDef['mongoUri'] != hostDefLast['mongoUri']):
        changed = True
    hostDefLast = None
    if (not changed):
        return
    self.stopAndClearHost(hostKey)
    self.startMonitoringThreads(hostDef)
