relstorage.adapters.oidallocator – IOIDAllocator implementations#

IOIDAllocator implementations.

class AbstractOIDAllocator[source]#

Bases: ABC

These objects are intended to be stateless.

They consult an underlying database sequence than increases, and then derive additional OIDs from that sequence. new_oids returns a list of those OIDs, with the largest such OID in position 0.

class AbstractRangedOIDAllocator[source]#

Bases: AbstractOIDAllocator

class AbstractTableOIDAllocator(driver)[source]#

Bases: AbstractRangedOIDAllocator

Implements OID allocation using a table, new_oid, with an incrementing column.


Return a sequence of new, unused OIDs.

garbage_collect_interval = 100001#

After this many allocated OIDs should the (unlucky) thread that allocated the one evenly divisible by this number attempt to remove old OIDs. Set to None to disable periodic garbage collection.

keep_history = None#

To use bound queries, we need to know whether we’re keeping history. It doesn’t change anything, though.