ICF 3.0.5.47
Technical documentation of ICF Libraries
iproc::TMemCachedProducerComp< Key, CacheObject > Class Template Reference

Template implementation iproc::TILockedProducer buffering objects in memory cache. More...

#include <TMemCachedProducerComp.h>

Inheritance diagram for iproc::TMemCachedProducerComp< Key, CacheObject >:
Collaboration diagram for iproc::TMemCachedProducerComp< Key, CacheObject >:

Public Types

typedef icomp::CComponentBase BaseClass
 
typedef TILockedProducer< Key, CacheObject > LockedProducerType
 

Public Member Functions

virtual const CacheObject * ProduceLockedObject (const Key &key)
 Begin of accessing to cached element.
 
virtual void UnlockObject (const CacheObject *objectPtr)
 End of accessing to cached element.
 
- Public Member Functions inherited from icomp::CComponentBase
 CComponentBase ()
 Create component and assign it to specific context.
 
 CComponentBase (const CComponentBase &)=delete
 
CComponentBaseoperator= (const CComponentBase &)=delete
 
virtual const ICompositeComponentGetParentComponent (bool ownerOnly=false) const
 Get parent of this component.
 
virtual void * GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="")
 Get access to specified component interface.
 
virtual const IComponentContextGetComponentContext () const
 Get access to component context describing all application-specified component information loaded from components registry.
 
virtual void SetComponentContext (const IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner)
 Set component context of this component.
 
- Public Member Functions inherited from icomp::IComponent
- Public Member Functions inherited from iproc::TILockedProducer< Key, CacheObject >

Protected Member Functions

void CleanElementList ()
 Remove elements from list if cumulated weight is above defined maximum.
 
- Protected Member Functions inherited from icomp::CComponentBase
bool IsComponentActive () const
 Check if component is active.
 
virtual void OnComponentCreated ()
 
virtual void OnComponentDestroyed ()
 
virtual const IRealComponentStaticInfoGetComponentStaticInfo () const =0
 Get access to static info of this component.
 

Additional Inherited Members

- Static Protected Member Functions inherited from icomp::CComponentBase
static const IRealComponentStaticInfoInitStaticInfo (IComponent *componentPtr)
 
static QByteArray GetComponentId (const IComponentContext *componentContextPtr, const QByteArray &contextId=QByteArray())
 

Detailed Description

template<class Key, class CacheObject>
class iproc::TMemCachedProducerComp< Key, CacheObject >

Template implementation iproc::TILockedProducer buffering objects in memory cache.

As a source of produced object instances some slave implementation is used.

Definition at line 26 of file TMemCachedProducerComp.h.

Member Typedef Documentation

◆ BaseClass

template<class Key , class CacheObject >
icomp::CComponentBase iproc::TMemCachedProducerComp< Key, CacheObject >::BaseClass

Definition at line 31 of file TMemCachedProducerComp.h.

◆ LockedProducerType

template<class Key , class CacheObject >
TILockedProducer<Key, CacheObject> iproc::TMemCachedProducerComp< Key, CacheObject >::LockedProducerType

Definition at line 32 of file TMemCachedProducerComp.h.

Member Function Documentation

◆ CleanElementList()

template<class Key , class CacheObject >
void iproc::TMemCachedProducerComp< Key, CacheObject >::CleanElementList ( )
protected

Remove elements from list if cumulated weight is above defined maximum.

Definition at line 128 of file TMemCachedProducerComp.h.

◆ ProduceLockedObject()

template<class Key , class CacheObject >
const CacheObject * iproc::TMemCachedProducerComp< Key, CacheObject >::ProduceLockedObject ( const Key & key)
virtual

Begin of accessing to cached element.

Returns
cached object, if it was possible to produce it for specified key.

Implements iproc::TILockedProducer< Key, CacheObject >.

Definition at line 79 of file TMemCachedProducerComp.h.

◆ UnlockObject()

template<class Key , class CacheObject >
void iproc::TMemCachedProducerComp< Key, CacheObject >::UnlockObject ( const CacheObject * objectPtr)
virtual

End of accessing to cached element.

Implements iproc::TILockedProducer< Key, CacheObject >.

Definition at line 111 of file TMemCachedProducerComp.h.


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

© Witold Gantzke and Kirill Lepskiy