Class BeaconHintStore

Nested Relationships

Nested Types

Class Documentation

class BeaconHintStore

Public Types

enum class HintStatus

Values:

enumerator ACTIVE
enumerator STALE
enumerator EXPIRED

Public Functions

BeaconHintStore()
explicit BeaconHintStore(Config config)
bool update(const BeaconHint &hint)

Insert or refresh a hint. Returns false if capacity full for new entity_ids.

std::vector<StoredHint> evict_and_snapshot()

Atomic: evict expired hints, then return consistent snapshot of remaining hints.

std::optional<StoredHint> get(const std::string &entity_id) const

Get a single hint by entity_id (thread-safe read).

size_t size() const

Current number of stored hints.

struct Config

Public Members

double beacon_ttl_sec = {10.0}
double beacon_expiry_sec = {300.0}
size_t max_hints = {10000}
struct StoredHint

Public Members

BeaconHint hint
HintStatus status
std::chrono::steady_clock::time_point last_seen