Public Types | Public Member Functions | Protected Member Functions | List of all members
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 >:
icomp::CComponentBase iproc::TILockedProducer< Key, CacheObject > icomp::IComponent istd::IPolymorphic istd::IPolymorphic

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. More...
 
virtual void UnlockObject (const CacheObject *objectPtr)
 End of accessing to cached element. More...
 
- Public Member Functions inherited from icomp::IComponent
virtual const ICompositeComponentGetParentComponent (bool ownerOnly=false) const =0
 
virtual void * GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="")=0
 
virtual const IComponentContextGetComponentContext () const =0
 
virtual void SetComponentContext (const icomp::IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner)=0
 

Protected Member Functions

void CleanElementList ()
 Remove elements from list if cumulated weight is above defined maximum. More...
 

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 21 of file TMemCachedProducerComp.h.

Member Typedef Documentation

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

Definition at line 26 of file TMemCachedProducerComp.h.

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

Definition at line 27 of file TMemCachedProducerComp.h.

Member Function Documentation

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 123 of file TMemCachedProducerComp.h.

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 74 of file TMemCachedProducerComp.h.

References NULL.

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 106 of file TMemCachedProducerComp.h.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy