QxOrm 1.4.9
C++ Object Relational Mapping library
Loading...
Searching...
No Matches
qx::cache::detail::QxCache Class Reference

#include <QxCache.h>

Inheritance diagram for qx::cache::detail::QxCache:
qx::QxSingleton< QxCache > qx::IxSingleton

Public Member Functions

 QxCache ()
 
virtual ~QxCache ()
 
long getCurrCost () const
 
long getMaxCost () const
 
void setMaxCost (long l)
 
long count () const
 
long size () const
 
bool isEmpty () const
 
bool exist (const QString &sKey) const
 
bool contains (const QString &sKey) const
 
qx::any at (const QString &sKey)
 
long insertionCost (const QString &sKey)
 
QDateTime insertionDateTime (const QString &sKey)
 
void clear ()
 
bool insert (const QString &sKey, const qx::any &anyObj, long lCost=1, const QDateTime &dt=QDateTime())
 
bool remove (const QString &sKey)
 

Protected Types

typedef std::tuple< long, QDateTime, qx::anytype_qx_cache
 
typedef qx::QxCollection< QString, type_qx_cachetype_qx_lst_cache
 

Protected Attributes

type_qx_lst_cache m_cache
 List of objects in cache under qx::any format.
 
QMutex m_oMutexCache
 Mutex => 'QxCache' is thread-safe.
 
long m_lMaxCost
 Max cost before deleting object in cache.
 
long m_lCurrCost
 Current cost in cache.
 
- Protected Attributes inherited from qx::IxSingleton
QString m_sKeySingleton
 Singleton key used by 'QxSingletonX' container.
 

Private Member Functions

void updateCost ()
 

Friends

class qx::QxSingleton< QxCache >
 

Additional Inherited Members

- Static Public Member Functions inherited from qx::QxSingleton< QxCache >
static QxCache * getSingleton ()
 
static void deleteSingleton ()
 
- Protected Member Functions inherited from qx::QxSingleton< QxCache >
 QxSingleton (const QString &sKey)
 
virtual ~QxSingleton ()
 
virtual void deleteInstance ()
 
- Protected Member Functions inherited from qx::IxSingleton
 IxSingleton (const QString &sKey)
 
virtual ~IxSingleton ()
 
- Static Protected Member Functions inherited from qx::QxSingleton< QxCache >
static bool isSingletonNull ()
 
- Static Protected Member Functions inherited from qx::IxSingleton
static void initQxSingletonX ()
 

Detailed Description

Definition at line 57 of file QxCache.h.

Member Typedef Documentation

◆ type_qx_cache

typedef std::tuple<long, QDateTime, qx::any> qx::cache::detail::QxCache::type_qx_cache
protected

Definition at line 64 of file QxCache.h.

◆ type_qx_lst_cache

Definition at line 65 of file QxCache.h.

Constructor & Destructor Documentation

◆ QxCache()

qx::cache::detail::QxCache::QxCache ( )

◆ ~QxCache()

virtual qx::cache::detail::QxCache::~QxCache ( )
virtual

Member Function Documentation

◆ at()

qx::any qx::cache::detail::QxCache::at ( const QString & sKey)

◆ clear()

void qx::cache::detail::QxCache::clear ( )

◆ contains()

bool qx::cache::detail::QxCache::contains ( const QString & sKey) const

◆ count()

long qx::cache::detail::QxCache::count ( ) const

◆ exist()

bool qx::cache::detail::QxCache::exist ( const QString & sKey) const

◆ getCurrCost()

long qx::cache::detail::QxCache::getCurrCost ( ) const

◆ getMaxCost()

long qx::cache::detail::QxCache::getMaxCost ( ) const

◆ insert()

bool qx::cache::detail::QxCache::insert ( const QString & sKey,
const qx::any & anyObj,
long lCost = 1,
const QDateTime & dt = QDateTime() )

◆ insertionCost()

long qx::cache::detail::QxCache::insertionCost ( const QString & sKey)

◆ insertionDateTime()

QDateTime qx::cache::detail::QxCache::insertionDateTime ( const QString & sKey)

◆ isEmpty()

bool qx::cache::detail::QxCache::isEmpty ( ) const

◆ remove()

bool qx::cache::detail::QxCache::remove ( const QString & sKey)

◆ setMaxCost()

void qx::cache::detail::QxCache::setMaxCost ( long l)

◆ size()

long qx::cache::detail::QxCache::size ( ) const

◆ updateCost()

void qx::cache::detail::QxCache::updateCost ( )
private

Friends And Related Symbol Documentation

◆ qx::QxSingleton< QxCache >

friend class qx::QxSingleton< QxCache >
friend

Definition at line 57 of file QxCache.h.

Member Data Documentation

◆ m_cache

type_qx_lst_cache qx::cache::detail::QxCache::m_cache
protected

List of objects in cache under qx::any format.

Definition at line 67 of file QxCache.h.

◆ m_lCurrCost

long qx::cache::detail::QxCache::m_lCurrCost
protected

Current cost in cache.

Definition at line 70 of file QxCache.h.

◆ m_lMaxCost

long qx::cache::detail::QxCache::m_lMaxCost
protected

Max cost before deleting object in cache.

Definition at line 69 of file QxCache.h.

◆ m_oMutexCache

QMutex qx::cache::detail::QxCache::m_oMutexCache
protected

Mutex => 'QxCache' is thread-safe.

Definition at line 68 of file QxCache.h.


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