# pyzor.engines

- pyzor.engines.common
  - `BaseEngine`
    - `BaseEngine.absolute_source`
    - `BaseEngine.get_prefork_connections()`
    - `BaseEngine.handles_one_step`
    - `BaseEngine.items()`
    - `BaseEngine.iteritems()`
    - `BaseEngine.report()`
    - `BaseEngine.whitelist()`
  - `DBHandle`
    - `DBHandle.multi_processing`
    - `DBHandle.multi_threaded`
    - `DBHandle.prefork`
    - `DBHandle.single_threaded`
  - `DatabaseError`
  - `Record`
    - `Record.r_increment()`
    - `Record.r_update()`
    - `Record.wl_increment()`
    - `Record.wl_update()`
- pyzor.engines.gdbm
  - `GdbmDBHandle`
    - `GdbmDBHandle.absolute_source`
    - `GdbmDBHandle.apply_method()`
    - `GdbmDBHandle.decode_record()`
    - `GdbmDBHandle.decode_record_0()`
    - `GdbmDBHandle.decode_record_1()`
    - `GdbmDBHandle.encode_record()`
    - `GdbmDBHandle.fields`
    - `GdbmDBHandle.handles_one_step`
    - `GdbmDBHandle.items()`
    - `GdbmDBHandle.iteritems()`
    - `GdbmDBHandle.log`
    - `GdbmDBHandle.reorganize_period`
    - `GdbmDBHandle.start_reorganizing()`
    - `GdbmDBHandle.start_syncing()`
    - `GdbmDBHandle.sync_period`
    - `GdbmDBHandle.this_version`
  - `ThreadedGdbmDBHandle`
    - `ThreadedGdbmDBHandle.apply_method()`
- pyzor.engines.mysql
  - `MySQLDBHandle`
    - `MySQLDBHandle.absolute_source`
    - `MySQLDBHandle.get_prefork_connections()`
    - `MySQLDBHandle.handles_one_step`
    - `MySQLDBHandle.items()`
    - `MySQLDBHandle.iteritems()`
    - `MySQLDBHandle.log`
    - `MySQLDBHandle.reconnect()`
    - `MySQLDBHandle.reconnect_period`
    - `MySQLDBHandle.reorganize_period`
    - `MySQLDBHandle.report()`
    - `MySQLDBHandle.start_reorganizing()`
    - `MySQLDBHandle.whitelist()`
  - `ProcessMySQLDBHandle`
    - `ProcessMySQLDBHandle.reconnect()`
  - `ThreadedMySQLDBHandle`
    - `ThreadedMySQLDBHandle.reconnect()`
- pyzor.engines.redis
  - `RedisDBHandle`
    - `RedisDBHandle.absolute_source`
    - `RedisDBHandle.get_prefork_connections()`
    - `RedisDBHandle.handles_one_step`
    - `RedisDBHandle.items()`
    - `RedisDBHandle.iteritems()`
    - `RedisDBHandle.log`
    - `RedisDBHandle.report()`
    - `RedisDBHandle.whitelist()`
  - `ThreadedRedisDBHandle`
  - `decode_date()`
  - `encode_date()`
  - `safe_call()`

Database backends for pyzord.

The database class must expose a dictionary-like interface, allowing access via __getitem__, __setitem__, and __delitem__. The key will be a forty character string, and the value should be an instance of the Record class.

If the database backend cannot store the Record objects natively, then it must transparently take care of translating to/from Record objects in __setitem__ and __getitem__.

The database class should take care of expiring old values at the appropriate interval.