IntrusiveHashMap

IntrusiveHashMap is a hash map that requires links to be explicitly embedded in the contained items.

Definition

template<typename L>
class IntrusiveHashMap

Reference documentation.

Usage

Examples

Design Notes

The historic goal of this class is to replace the DLL list support in Traffic Server. The benefits of this are

  • Remove dependency on the C preprocessor.

  • Provide greater flexibility in the internal link members. Because of the use of the descriptor and its static methods, the links can be anywhere in the object, including in nested structures or super classes. The links are declared like normal members and do not require specific macros.

  • Provide STL compliant iteration. This makes the class easier to use in general and particularly in the case of range for loops.

  • Track the number of items in the list.

  • Provide queue support, which is of such low marginal expense there is, IMHO, no point in providing a separate class for it.