sc3nb.sc_objects.allocators
Classes for managing ID allocations.
Module Contents
Class List
Helper class that provides a standard way to create an ABC using |
|
Allows allocating ids for Nodes. |
|
Allows allocating blocks of ids / indexes |
Content
- class sc3nb.sc_objects.allocators.Allocator[source]
Bases:
abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
Overview:
- class sc3nb.sc_objects.allocators.NodeAllocator(client_id: int)[source]
Bases:
AllocatorAllows allocating ids for Nodes.
Overview:
- class sc3nb.sc_objects.allocators.BlockAllocator(num_ids: int, offset: int)[source]
Bases:
AllocatorAllows allocating blocks of ids / indexes
Overview:
Allocate the next free ids
Mark ids as free again.