'Periodically update our state and store the mappings.'

def _PeriodicThread(self):

    ok = rdf_data_server.DataServerState.Status.AVAILABLE
    (num_components, avg_component) = self.service.GetComponentInformation()
    state = rdf_data_server.DataServerState(size=self.service.Size(), load=0, status=ok, num_components=num_components, avg_component=avg_component)
    self.myself.UpdateState(state)
    self.service.SaveServerMapping(self.mapping)
