CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
MessageIndex.h File Reference

In-memory, multi-key index over DataMessages with TTL-based expiry — the storage engine behind whiteboards. More...

#include "DataMessage.h"
#include "PsyTime.h"
#include "Subscriptions.h"
Include dependency graph for MessageIndex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  cmlabs::MessageIndex
 Multi-key in-memory index and lifetime manager for DataMessages. More...

Namespaces

namespace  cmlabs

Detailed Description

In-memory, multi-key index over DataMessages with TTL-based expiry — the storage engine behind whiteboards.

A MessageIndex keeps DataMessages ordered by time, type and any number of user-declared index keys (time, string, integer or float entries), so subscription retrievals (RetrieveSpec) can be answered with range queries instead of scans. Messages are evicted when their end-of-life (creation time + TTL, or a default TTL) passes, during periodic doMaintenance() calls. Optionally messages can be spooled to file storage.

Definition in file MessageIndex.h.