#include <tsharedmemorykvs.h>
|
static bool | initialize (const QString &name, const QString &options) |
|
The TSharedMemoryKvs class provides a means of operating a in-memory KVS built in the server process.
◆ TSharedMemoryKvs()
TSharedMemoryKvs::TSharedMemoryKvs |
( |
| ) |
|
◆ ~TSharedMemoryKvs()
TSharedMemoryKvs::~TSharedMemoryKvs |
( |
| ) |
|
◆ begin()
Locks the attached shared-memory segment for writing by this process and returns an STL-style iterator pointing to the first item in the KVS.
- See also
- class WriteLockingIterator
◆ cleanup()
void TSharedMemoryKvs::cleanup |
( |
| ) |
|
◆ clear()
void TSharedMemoryKvs::clear |
( |
| ) |
|
Removes all items from the KVS.
◆ count()
uint TSharedMemoryKvs::count |
( |
| ) |
const |
Returns the number of items set.
◆ end()
Returns an STL-style iterator pointing just after the last item in the KVS.
- See also
- class WriteLockingIterator
◆ find() [1/2]
uint TSharedMemoryKvs::find |
( |
const QByteArray & |
key, |
|
|
Bucket & |
bucket |
|
) |
| const |
|
protected |
◆ find() [2/2]
bool TSharedMemoryKvs::find |
( |
uint |
index, |
|
|
Bucket & |
bucket |
|
) |
| const |
|
protected |
◆ gc()
void TSharedMemoryKvs::gc |
( |
| ) |
|
Executes garbage collection.
◆ get()
QByteArray TSharedMemoryKvs::get |
( |
const QByteArray & |
key | ) |
|
Returns the value associated with the key; otherwise returns an empty byte array.
◆ index()
uint TSharedMemoryKvs::index |
( |
const QByteArray & |
key | ) |
const |
|
protected |
◆ initialize()
bool TSharedMemoryKvs::initialize |
( |
const QString & |
name, |
|
|
const QString & |
options |
|
) |
| |
|
static |
Initializes in-memory KVS with the given name and options.
◆ loadFactor()
float TSharedMemoryKvs::loadFactor |
( |
| ) |
const |
◆ lockForRead()
bool TSharedMemoryKvs::lockForRead |
( |
| ) |
|
Locks the shared memory segment for reading by this process.
◆ lockForWrite()
bool TSharedMemoryKvs::lockForWrite |
( |
| ) |
|
Locks the shared memory segment for writing by this process.
◆ next()
uint TSharedMemoryKvs::next |
( |
uint |
index | ) |
const |
|
protected |
◆ rehash()
void TSharedMemoryKvs::rehash |
( |
| ) |
|
◆ remove() [1/2]
bool TSharedMemoryKvs::remove |
( |
const QByteArray & |
key | ) |
|
Removes the specified key.
A key is ignored if it does not exist.
◆ remove() [2/2]
void TSharedMemoryKvs::remove |
( |
uint |
index | ) |
|
|
protected |
◆ searchIndex()
int TSharedMemoryKvs::searchIndex |
( |
int |
first | ) |
|
|
protected |
◆ set()
bool TSharedMemoryKvs::set |
( |
const QByteArray & |
key, |
|
|
const QByteArray & |
value, |
|
|
int |
seconds |
|
) |
| |
Sets the key to hold the value.
If the key already holds a value, it is overwritten, regardless of its type.
◆ tableSize()
uint TSharedMemoryKvs::tableSize |
( |
| ) |
const |
◆ unlock()
bool TSharedMemoryKvs::unlock |
( |
| ) |
|
Releases the lock on the shared memory segment.
◆ TCacheSharedMemoryStore
friend class TCacheSharedMemoryStore |
|
friend |
The documentation for this class was generated from the following files: