Expiration tracker keeps track of soonest-to-expire keys. More...
#include <session.h>
Public Types | |
using | DataPair = std::pair< uint64_t, std::string > |
using | iterator = typename std::set< DataPair >::const_iterator |
Public Member Functions | |
void | add (std::string key, uint64_t time) |
void | remove (const std::string &key) |
uint64_t | peek_first () const |
Get expiration time of soonest-to-expire entry. | |
std::string | pop_first () |
iterator | begin () const |
iterator | end () const |
Expiration tracker keeps track of soonest-to-expire keys.
|
inline |
Add key with time to tracker. If the key is already present, it will be updated