9class TSharedMemoryKvsDriver;
48 const QByteArray &key()
const;
49 const QByteArray &value()
const;
50 bool isExpired()
const;
51 const QByteArray &operator*()
const;
70 QByteArray get(
const QByteArray &key);
71 bool set(
const QByteArray &key,
const QByteArray &value,
int seconds);
72 bool remove(
const QByteArray &key);
74 uint tableSize()
const;
77 float loadFactor()
const;
86 static bool initialize(
const QString &name,
const QString &options);
90 uint find(
const QByteArray &key,
Bucket &bucket)
const;
91 bool find(uint index,
Bucket &bucket)
const;
93 uint index(
const QByteArray &key)
const;
94 uint next(uint index)
const;
95 void remove(uint index);
100 TSharedMemoryKvsDriver *driver();
101 const TSharedMemoryKvsDriver *driver()
const;
103 TKvsDatabase _database;
104 hash_header_t *_h {
nullptr};
106 friend class TCacheSharedMemoryStore;
The Bucket class represents a data bucket for the in-memory KVS.
Definition tsharedmemorykvs.h:14
QByteArray value
Definition tsharedmemorykvs.h:17
qint64 expires
Definition tsharedmemorykvs.h:18
bool isExpired() const
Definition tsharedmemorykvs.h:20
friend QDataStream & operator<<(QDataStream &ds, const Bucket &bucket)
Definition tsharedmemorykvs.h:32
friend QDataStream & operator>>(QDataStream &ds, Bucket &bucket)
Definition tsharedmemorykvs.h:38
void clear()
Definition tsharedmemorykvs.h:25
QByteArray key
Definition tsharedmemorykvs.h:16
The WriteLockingIterator class provides an STL-style iterator with write-locking for TSharedMemoryKvs...
Definition tsharedmemorykvs.h:45
bool operator==(const WriteLockingIterator &other) const
Definition tsharedmemorykvs.h:53
bool operator!=(const WriteLockingIterator &other) const
Definition tsharedmemorykvs.h:54
The TSharedMemoryKvs class provides a means of operating a in-memory KVS built in the server process.
Definition tsharedmemorykvs.h:12
int searchIndex(int first)
KvsEngine
Definition tfnamespace.h:239
T_CORE_EXPORT int64_t getMSecsSinceEpoch()
Definition tglobal.cpp:295
#define T_CORE_EXPORT
Definition tdeclexport.h:28
#define T_DISABLE_COPY(Class)
Definition tdeclexport.h:37
#define T_DISABLE_MOVE(Class)
Definition tdeclexport.h:41