'Syncs this object with the data store, maintaining object validity.'

def Flush(self, sync=True):

    if (self.locked and (self.CheckLease() == 0)):
        raise LockError('Can    not    update    lease    that    has    already    expired.')
    self._WriteAttributes(sync=sync)
    self._SyncAttributes()
    if self.parent:
        self.parent.Flush(sync=sync)
