'Delete rows from the db_contains_type table that are marked deleted
and whose created_at timestamp is < age_timestamp.  Also deletes rows
from incoming_sync and outgoing_sync where the updated_at timestamp is
< sync_timestamp.
In addition, this calls the DatabaseBroker\'s :func:`_reclaim` method.
:param age_timestamp: max created_at timestamp of object rows to delete
:param sync_timestamp: max update_at timestamp of sync rows to delete'

def reclaim(self, age_timestamp, sync_timestamp):

    if ((self.db_file != ':memory:') and os.path.exists(self.pending_file)):
        with lock_parent_directory(self.pending_file, self.pending_timeout):
            self._commit_puts()
    with self.get() as conn:
        conn.execute(('\n                                                                DELETE    FROM    %s    WHERE    deleted    =    1    AND    %s    <    ?\n                                                ' % (self.db_contains_type, self.db_reclaim_timestamp)), (age_timestamp,))
        try:
            conn.execute('\n                                                                                DELETE    FROM    outgoing_sync    WHERE    updated_at    <    ?\n                                                                ', (sync_timestamp,))
            conn.execute('\n                                                                                DELETE    FROM    incoming_sync    WHERE    updated_at    <    ?\n                                                                ', (sync_timestamp,))
        except sqlite3.OperationalError as err:
            if ('no    such    column:    updated_at' not in str(err)):
                raise
        DatabaseBroker._reclaim(self, conn, age_timestamp)
        conn.commit()
