def __init__(self, data_dir, checkpoint_operations=<NUM_LIT:100>, checkpoint_timeout=<NUM_LIT:30>):
QueueStore.__init__(self)<EOL>self._opcount = <NUM_LIT:0><EOL>self._last_sync = datetime.now()<EOL>self.data_dir = data_dir<EOL>self.checkpoint_operations = checkpoint_operations<EOL>self.checkpoint_timeout = timedelta(seconds=checkpoint_timeout)<EOL>self.queue_metadata = shelve.open(os.path.join(<EOL>self.data_dir, '<STR_LIT>'), writeback=True)<EOL>self.frame_store = shelve.open(os.path.join(<EOL>self.data_dir, '<STR_LIT>'), writeback=False)<EOL>
@param data_dir: The directory where DBM files will be stored.
@param data_dir: C{str}

@param checkpoint_operations: Number of operations between syncs.
@type checkpoint_operations: C{int}

@param checkpoint_timeout: Max time (in seconds) that can elapse between sync of cache.
@type checkpoint_timeout: C{float}