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

Ipc::MemMapSlot::MemMapSlot ( )

Definition at line 283 of file MemMap.cc.

References key, and p.

Referenced by size().

Member Function Documentation

bool Ipc::MemMapSlot::empty ( ) const

Definition at line 308 of file MemMap.cc.

References key.

Referenced by Ipc::MemMap::freeLocked(), Ipc::MemMap::openForReadingAt(), and Ipc::MemMap::openForWritingAt().

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

Definition at line 38 of file MemMap.h.

References key.

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

Definition at line 302 of file MemMap.cc.

References key.

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

Definition at line 292 of file MemMap.cc.

References key, and p.

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

Definition at line 37 of file MemMap.h.

References MemMapSlot().

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

Member Data Documentation

time_t Ipc::MemMapSlot::expire

Definition at line 50 of file MemMap.h.

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

Definition at line 47 of file MemMap.h.

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

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

Definition at line 48 of file MemMap.h.

Referenced by MemMapSlot().

size_t Ipc::MemMapSlot::pSize

Definition at line 49 of file MemMap.h.

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