'Read the file with previous allocations recorded.
See the note in the allocate method for more detail.'

def __init__(self, state_file, ItemClass, item_pool, delimiter=','):

    self.ItemClass = ItemClass
    self.state_file = state_file
    self.allocations = {}
    self.remembered = {}
    self.pool = item_pool
    read_error = False
    for line in self._read():
        try:
            (key, saved_value) = line.strip().split(delimiter)
            self.remembered[key] = self.ItemClass(saved_value)
        except ValueError:
            read_error = True
            LOG.warning(_LW('Invalid    line    in    %(file)s,    ignoring:    %(line)s'), {'file': state_file, 'line': line})
    self.pool.difference_update(self.remembered.values())
    if read_error:
        LOG.debug('Re-writing    file    %s    due    to    read    error', state_file)
        self._write_allocations()
