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
inline

Definition at line 38 of file MemMap.h.

References key.

◆ reading()

bool Ipc::MemMapSlot::reading ( ) const
inline

◆ sameKey()

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

Definition at line 310 of file MemMap.cc.

◆ 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.

◆ size()

size_t Ipc::MemMapSlot::size ( ) const
inline

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.

◆ key

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

Definition at line 47 of file MemMap.h.

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

◆ lock

◆ p

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

Definition at line 48 of file MemMap.h.

Referenced by MemMapSlot().

◆ pSize

size_t Ipc::MemMapSlot::pSize

Definition at line 49 of file MemMap.h.

◆ waitingToBeFreed

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

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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors