MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
collector::CacheManager< Obj >::CachedObject Class Reference

#include <cache_manager.h>

Public Member Functions

 CachedObject (CacheManager *parent=nullptr)
 
 CachedObject (CachedObject &&other)
 
template<typename... Args>
 CachedObject (CacheManager *parent, bool wait, Args &&...args)
 
 ~CachedObject ()
 
CachedObjectoperator= (CachedObject &&other)
 
bool empty () const
 
bool operator== (const Object &obj) const
 
Object operator-> ()
 
Object get ()
 
void set_dirty ()
 Mark that the object is dirty. More...
 
void set_clean ()
 Mark the the object is clean. More...
 
bool is_dirty () const
 
CacheManagerget_parent () const
 

Public Attributes

CacheManagerparent_
 
bool wait_ {false}
 
Object object_
 

Private Attributes

bool dirty_ {false}
 

Constructor & Destructor Documentation

◆ CachedObject() [1/3]

template<typename Obj >
collector::CacheManager< Obj >::CachedObject::CachedObject ( CacheManager parent = nullptr)
inline

◆ CachedObject() [2/3]

template<typename Obj >
collector::CacheManager< Obj >::CachedObject::CachedObject ( CachedObject &&  other)
inline

◆ CachedObject() [3/3]

template<typename Obj >
template<typename... Args>
collector::CacheManager< Obj >::CachedObject::CachedObject ( CacheManager parent,
bool  wait,
Args &&...  args 
)
inlineexplicit

◆ ~CachedObject()

template<typename Obj >
collector::CacheManager< Obj >::CachedObject::~CachedObject ( )
inline

Member Function Documentation

◆ empty()

template<typename Obj >
bool collector::CacheManager< Obj >::CachedObject::empty ( ) const
inline

◆ get()

template<typename Obj >
Object collector::CacheManager< Obj >::CachedObject::get ( )
inline

◆ get_parent()

template<typename Obj >
CacheManager * collector::CacheManager< Obj >::CachedObject::get_parent ( ) const
inline

◆ is_dirty()

template<typename Obj >
bool collector::CacheManager< Obj >::CachedObject::is_dirty ( ) const
inline

◆ operator->()

template<typename Obj >
Object collector::CacheManager< Obj >::CachedObject::operator-> ( )
inline

◆ operator=()

template<typename Obj >
CachedObject & collector::CacheManager< Obj >::CachedObject::operator= ( CachedObject &&  other)
inline

◆ operator==()

template<typename Obj >
bool collector::CacheManager< Obj >::CachedObject::operator== ( const Object obj) const
inline

◆ set_clean()

template<typename Obj >
void collector::CacheManager< Obj >::CachedObject::set_clean ( )
inline

Mark the the object is clean.

After marking object dirty, this method removes the dirty flag. It is useful after successful processing Obj, and there is no need of rollback its state.

◆ set_dirty()

template<typename Obj >
void collector::CacheManager< Obj >::CachedObject::set_dirty ( )
inline

Mark that the object is dirty.

Dirty object means that it is release by the manager without trying to cache it. This functionality is useful, when the user code, can't rollback changed done at instance of Obj thus releasing is the best option.

Member Data Documentation

◆ dirty_

template<typename Obj >
bool collector::CacheManager< Obj >::CachedObject::dirty_ {false}
private

◆ object_

template<typename Obj >
Object collector::CacheManager< Obj >::CachedObject::object_

◆ parent_

template<typename Obj >
CacheManager* collector::CacheManager< Obj >::CachedObject::parent_

◆ wait_

template<typename Obj >
bool collector::CacheManager< Obj >::CachedObject::wait_ {false}

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