#include <idPool.h>


Classes | |
| struct | Block |
Public Types | |
| enum | MaxCapacity { MAX_CAPACITY = 0xfffffff0u } |
Public Member Functions | |
| IDPool (const uint32_t initialCapacity) | |
| Construct a new identifier pool. | |
| ~IDPool () | |
| Destruct the identifier pool. | |
| uint32_t | genIDs (const uint32_t range) |
| Generate a new, consecutive block of identifiers. | |
| void | freeIDs (const uint32_t start, const uint32_t range) |
| Release a block of previously generated identifiers. | |
Manages re-usable, unique identifiers. Can allocate up to MAX_CAPACITY identifiers. Used in Equalizer for session-unique object identifiers. Access to the identifier pool is thread-safe.
Definition at line 42 of file idPool.h.
| eq::base::IDPool::IDPool | ( | const uint32_t | initialCapacity | ) |
Construct a new identifier pool.
| initialCapacity | the initial capacity of the pool, the identifiers from initialCapacity to MAX_CAPACITY are considered as allocated. |
Definition at line 33 of file idPool.cpp.
| eq::base::IDPool::~IDPool | ( | ) |
| uint32_t eq::base::IDPool::genIDs | ( | const uint32_t | range | ) |
Generate a new, consecutive block of identifiers.
| range | The number of identifiers to allocate |
Definition at line 62 of file idPool.cpp.
Referenced by eq::net::Session::genIDs().

| void eq::base::IDPool::freeIDs | ( | const uint32_t | start, | |
| const uint32_t | range | |||
| ) |
Release a block of previously generated identifiers.
| start | the first identifier of the block. | |
| range | the number of consecutive identifiers. |
Definition at line 99 of file idPool.cpp.
Referenced by eq::net::Session::freeIDs().

0.9 by
1.5.8