Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

CdbBdbProxyBase< T > Class Template Reference

This class represents a base class for the Condition/DB proxies. More...

#include <CdbBdbProxyBase.hh>

Inheritance diagram for CdbBdbProxyBase< T >:

IfdDataProxyTemplate CdbBdbProxyCache CdbBdbEnvProxy< T, P > CdbBdbProxyBaseUsingRevision< T > List of all members.

Public Member Functions

 CdbBdbProxyBase (BdbCondDefStrategy *theStrategy=0)
 The normal and default constructor.

virtual ~CdbBdbProxyBase ()
 The destructor.

virtual T * faultHandler (IfdProxyDict *theDict, const IfdKey &theKey, AbsArg &theArg)
 The ProxyDict fault handler.

virtual void storeHandler (IfdProxyDict *theDict, const IfdKey &theKey, AbsArg &theArg, T *theObject)
 The ProxyDict store handler.

virtual void testCache ()
 The ProxyDict cache tester.


Protected Member Functions

virtual T * redefinedFaultHandler (const std::vector< CdbBdbProxyElement > &theListOfElements)=0
 The redefined fault handler.

virtual bool tryAnotherTime (const BdbTime &theOriginalTime, const std::vector< CdbBdbProxyElement > &theListOfElements, BdbTime &TheOtherTime)
 Return another time to try instead of original one.

T * transientCache ()
 Allow access to the cached transient.

void setTransientCache (T *theNewTransientPtr)
 Modify the cached transient.

BdbTime faultTime () const
 Allow access to the current fault time.

void invalidateTransientCache ()
 Invalidate the transiniet cache of the proxy.

const BdbCondDefStrategy * strategy () const
 Access strategy object.

void setStrategy (BdbCondDefStrategy *theNewStrategyPtr)
 Modify the strategy object.


Friends

class CdbRTestUtility

Detailed Description

template<class T>
class CdbBdbProxyBase< T >

This class represents a base class for the Condition/DB proxies.

The class is meant to be derived by every single proxy loading persistent objects from the Condition/DB. The roles of the class are:

Definition at line 23 of file CdbBdbProxyBase.hh.


Constructor & Destructor Documentation

template<class T>
CdbBdbProxyBase< T >::CdbBdbProxyBase BdbCondDefStrategy *    theStrategy = 0 [explicit]
 

The normal and default constructor.

The only optional argument of the constructor takes the strategy object for locating GenEnv parameters. If 0 pointer is passed then a default strategy will be enforced.

Note, that the ownreship of the strategy object is also passed to the constructor.

Definition at line 33 of file CdbBdbProxyBase.cc.

References CdbBdbProxyBase< T >::setStrategy(), and CdbBdbProxyBase< T >::strategy().

template<class T>
CdbBdbProxyBase< T >::~CdbBdbProxyBase   [virtual]
 

The destructor.

Definition at line 45 of file CdbBdbProxyBase.cc.


Member Function Documentation

template<class T>
T * CdbBdbProxyBase< T >::faultHandler IfdProxyDict *    theDict,
const IfdKey &    theKey,
AbsArg &    theArg
[virtual]
 

The ProxyDict fault handler.

This method implements the corresponding method defined at the base class or an interface.

Reimplemented in CdbBdbProxyBaseUsingRevision< T >, and CdbBdbProxyBaseUsingRevision< SimpleProxyProduct >.

Definition at line 50 of file CdbBdbProxyBase.cc.

References CdbBdbProxyBase< T >::invalidateTransientCache(), CdbBdbProxyCache::isCacheValid(), CdbBdbProxyBase< T >::redefinedFaultHandler(), CdbBdbProxyBase< T >::setTransientCache(), CdbBdbProxyBase< T >::strategy(), CdbStatus::Success, CdbBdbProxyBase< T >::transientCache(), CdbBdbProxyBase< T >::tryAnotherTime(), and CdbBdbProxyCache::updateCache().

template<class T>
BdbTime CdbBdbProxyBase< T >::faultTime   const [protected]
 

Allow access to the current fault time.

Definition at line 174 of file CdbBdbProxyBase.cc.

References CdbBdbProxyBase< T >::strategy().

template<class T>
void CdbBdbProxyBase< T >::invalidateTransientCache   [inline, protected]
 

Invalidate the transiniet cache of the proxy.

Definition at line 118 of file CdbBdbProxyBase.hh.

Referenced by CdbBdbProxyBaseUsingRevision< T >::faultHandler(), and CdbBdbProxyBase< T >::faultHandler().

template<class T>
virtual T* CdbBdbProxyBase< T >::redefinedFaultHandler const std::vector< CdbBdbProxyElement > &    theListOfElements [protected, pure virtual]
 

The redefined fault handler.

This method is to be implemented by derived classes. It does the actuall job of constructing the transient product of the corresponding proxy.

The method is called whenever the persistent cache of the current class is reloaded.

Implemented in CdbBdbEnvProxy< T, P >, CdbBdbNTupleProxy< T, NCOL >, SimpleProxy, and SimpleProxyUsingRevision.

Referenced by CdbBdbProxyBaseUsingRevision< T >::faultHandler(), and CdbBdbProxyBase< T >::faultHandler().

template<class T>
void CdbBdbProxyBase< T >::setStrategy BdbCondDefStrategy *    theNewStrategyPtr [inline, protected]
 

Modify the strategy object.

Definition at line 126 of file CdbBdbProxyBase.hh.

Referenced by CdbBdbProxyBase< T >::CdbBdbProxyBase().

template<class T>
void CdbBdbProxyBase< T >::setTransientCache T *    theNewTransientPtr [inline, protected]
 

Modify the cached transient.

Definition at line 110 of file CdbBdbProxyBase.hh.

Referenced by CdbBdbProxyBaseUsingRevision< T >::faultHandler(), CdbBdbProxyBase< T >::faultHandler(), and CdbBdbProxyBase< CdbCPtr< CdbNTuple< T, NCOL > > >::invalidateTransientCache().

template<class T>
void CdbBdbProxyBase< T >::storeHandler IfdProxyDict *    theDict,
const IfdKey &    theKey,
AbsArg &    theArg,
T *    theObject
[virtual]
 

The ProxyDict store handler.

This method implements the corresponding method defined at the base class or an interface.

Definition at line 157 of file CdbBdbProxyBase.cc.

template<class T>
const BdbCondDefStrategy* CdbBdbProxyBase< T >::strategy   const [inline, protected]
 

Access strategy object.

Definition at line 122 of file CdbBdbProxyBase.hh.

Referenced by CdbBdbProxyBase< T >::CdbBdbProxyBase(), CdbBdbProxyBaseUsingRevision< T >::faultHandler(), CdbBdbProxyBase< T >::faultHandler(), and CdbBdbProxyBase< T >::faultTime().

template<class T>
void CdbBdbProxyBase< T >::testCache   [virtual]
 

The ProxyDict cache tester.

This method implements the corresponding method defined at the base class or an interface.

Definition at line 167 of file CdbBdbProxyBase.cc.

template<class T>
T* CdbBdbProxyBase< T >::transientCache   [inline, protected]
 

Allow access to the cached transient.

Definition at line 106 of file CdbBdbProxyBase.hh.

Referenced by CdbBdbProxyBaseUsingRevision< T >::faultHandler(), and CdbBdbProxyBase< T >::faultHandler().

template<class T>
bool CdbBdbProxyBase< T >::tryAnotherTime const BdbTime   theOriginalTime,
const std::vector< CdbBdbProxyElement > &    theListOfElements,
BdbTime   TheOtherTime
[protected, virtual]
 

Return another time to try instead of original one.

This method is called whenever redefinedFaultHandler return zero pointer. If this function retuns true then the algorithm repeats with the different time returned in the anotherTime parameter. Default implementation in this class always returns false.

Definition at line 184 of file CdbBdbProxyBase.cc.

Referenced by CdbBdbProxyBaseUsingRevision< T >::faultHandler(), and CdbBdbProxyBase< T >::faultHandler().


Friends And Related Function Documentation

template<class T>
friend class CdbRTestUtility [friend]
 

Reimplemented from CdbBdbProxyCache.

Definition at line 137 of file CdbBdbProxyBase.hh.


The documentation for this class was generated from the following files:
Generated on Mon Dec 5 18:22:18 2005 for CDB by doxygen1.3-rc3