Ipc::MemMapSlot Class Reference

a MemMap basic element, holding basic shareable memory block info More...

#include <MemMap.h>

Collaboration diagram for Ipc::MemMapSlot:

Public Member Functions

 MemMapSlot ()
size_t size () const
size_t keySize () const
bool sameKey (const cache_key *const aKey) const
void set (const unsigned char *aKey, const void *block, size_t blockSize, time_t expire=0)
bool empty () const
bool reading () const
bool writing () const

Public Attributes

std::atomic< uint8_t > waitingToBeFreed
 may be accessed w/o a lock More...
ReadWriteLock lock
 protects slot data below More...
unsigned char key [MEMMAP_SLOT_KEY_SIZE]
 The entry key. More...
unsigned char p [MEMMAP_SLOT_DATA_SIZE]
 The memory block;. More...
size_t pSize
time_t expire

Detailed Description

Definition at line 33 of file MemMap.h.

Constructor & Destructor Documentation

◆ MemMapSlot()

Ipc::MemMapSlot::MemMapSlot ( )

Definition at line 291 of file MemMap.cc.

References key, and p.

Referenced by size().

Member Function Documentation

◆ empty()

bool Ipc::MemMapSlot::empty ( ) const

◆ keySize()

size_t Ipc::MemMapSlot::keySize ( ) const

Definition at line 38 of file MemMap.h.

References empty(), expire, key, and sameKey().

◆ reading()

bool Ipc::MemMapSlot::reading ( ) const

◆ sameKey()

bool Ipc::MemMapSlot::sameKey ( const cache_key *const  aKey) const

Definition at line 310 of file MemMap.cc.

References key.

Referenced by keySize().

◆ set()

void Ipc::MemMapSlot::set ( const unsigned char *  aKey,
const void *  block,
size_t  blockSize,
time_t  expire = 0 

Definition at line 300 of file MemMap.cc.

References expire, key, p, and pSize.

◆ size()

size_t Ipc::MemMapSlot::size ( ) const

Definition at line 37 of file MemMap.h.

References MemMapSlot().

◆ writing()

Member Data Documentation

◆ expire

time_t Ipc::MemMapSlot::expire

Definition at line 50 of file MemMap.h.

Referenced by keySize(), and set().

◆ key

unsigned char Ipc::MemMapSlot::key[MEMMAP_SLOT_KEY_SIZE]

Definition at line 47 of file MemMap.h.

Referenced by empty(), Ipc::MemMap::freeLocked(), keySize(), MemMapSlot(), sameKey(), and set().

◆ lock

◆ p

unsigned char Ipc::MemMapSlot::p[MEMMAP_SLOT_DATA_SIZE]

Definition at line 48 of file MemMap.h.

Referenced by MemMapSlot(), and set().

◆ pSize

size_t Ipc::MemMapSlot::pSize

Definition at line 49 of file MemMap.h.

Referenced by set().

◆ waitingToBeFreed

std::atomic<uint8_t> Ipc::MemMapSlot::waitingToBeFreed

The documentation for this class was generated from the following files:






Web Site Translations