Bdb packages | Design docs | Source docs | Guidelines | Recent releases

Search | Site Map .

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

BdbCollectionTFactory< T > Class Template Reference
[BdbEventStore]

#include <BdbCollectionTFactory.hh>

Inheritance diagram for BdbCollectionTFactory< T >:

BdbBridgeCollTFactory< T > BdbCollTFactoryDecorator< T > BdbTreeCollTFactory< T > BdbVectorCollTFactory< T > BdbFetchCollTFactory< T > BdbMetaDataCollTFactory< T > BdbNestedTransCollTFactory< T > List of all members.

Public Types

enum  Failure {
  kNoFailure, kExistsFailure, kLockFailure, kNameFailure,
  kAuthFailure, kOtherFailure
}

Public Methods

 BdbCollectionTFactory ()
 BdbCollectionTFactory (BdbAbstractClusteringHint &theCollectionHint, BdbAbstractClusteringHint &theTreeNodeHint)
virtual ~BdbCollectionTFactory ()
virtual const char * typeName () const=0
virtual BdbStatus existsError (const char *theName) const=0
virtual BdbStatus lockError (const BdbRefAny &persObj) const=0
virtual BdbStatus nameError () const=0
virtual BdbStatus authError (const char *theName) const=0
virtual Failure getResult () const
virtual BdbAbsCollectionT<
T > * 
getCollection (const char *const theCollPath, d_ULong initialSize=0)
virtual BdbAbsCollectionT<
T > * 
regetCollection ()

Protected Methods

virtual BdbAbstractClusteringHintcollectionHint () const
virtual BdbAbstractClusteringHintnodeHint () const
virtual const char * fullCollName () const
virtual const char * collName () const
virtual d_ULong initialSize () const
virtual void setInstanceHints (BdbAbstractClusteringHint *collectionHint, BdbAbstractClusteringHint *nodeHint)
virtual void setResult (Failure)

Static Protected Methods

BdbAbstractClusteringHintfactoryCollectionHint (BdbCollectionTFactory< T > &factory)
BdbAbstractClusteringHintfactoryNodeHint (BdbCollectionTFactory< T > &factory)
const char * factoryFullCollName (BdbCollectionTFactory< T > &factory)
const char * factoryCollName (BdbCollectionTFactory< T > &factory)
void setHints (BdbCollectionTFactory< T > &factory, BdbAbstractClusteringHint &collectionHint, BdbAbstractClusteringHint &nodeHint)

Private Methods

 BdbCollectionTFactory (const BdbCollectionTFactory< T > &aRhs)
const BdbCollectionTFactory<
T > & 
operator= (const BdbCollectionTFactory< T > &aRhs)
virtual BdbAbsCollectionT<
T > * 
createCollectionAtNode (BdbHandleAny &theHint, BdbHandle(BdbTreeNodeP)&theNode, const char *theName, d_ULong theInitialSize)
BdbAbsCollectionT< T > * attemptGet ()
 BdbRef (BdbTreeNodeP) _nodeP

Private Attributes

BdbAbstractClusteringHint_collectionHint
BdbAbstractClusteringHint_nodeHint
Failure _failure
char * _fullCollName
BdbRefAny _updatedCollHint
char * _collName
d_ULong _initialSize

Detailed Description

template<class T>
class BdbCollectionTFactory< T >

The BdbCollectionTFactory class is the interface for generation collections which is used by BdbEventStore::fetchCollection

Definition at line 65 of file BdbCollectionTFactory.hh.


Member Enumeration Documentation

template<class T>
enum BdbCollectionTFactory::Failure
 

Enumeration values:
kNoFailure 
kExistsFailure 
kLockFailure 
kNameFailure 
kAuthFailure 
kOtherFailure 

Definition at line 73 of file BdbCollectionTFactory.hh.


Constructor & Destructor Documentation

template<class T>
BdbCollectionTFactory< T >::BdbCollectionTFactory  
 

Constructs an instance of this class.

Definition at line 75 of file BdbCollectionTFactory.cc.

template<class T>
BdbCollectionTFactory< T >::BdbCollectionTFactory BdbAbstractClusteringHint   theCollectionHint,
BdbAbstractClusteringHint   theTreeNodeHint
 

Constructs an instance of this class.

Definition at line 84 of file BdbCollectionTFactory.cc.

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

Destroys this instance.

Definition at line 108 of file BdbCollectionTFactory.cc.

References BdbCollectionTFactory< T >::_collName, and BdbCollectionTFactory< T >::_fullCollName.

template<class T>
BdbCollectionTFactory< T >::BdbCollectionTFactory const BdbCollectionTFactory< T > &    aRhs [private]
 

stops default


Member Function Documentation

template<class T>
BdbAbsCollectionT< T > * BdbCollectionTFactory< T >::attemptGet   [private]
 

Attempt to get the collection

Reimplemented in BdbCollTFactoryDecorator< T >.

Definition at line 273 of file BdbCollectionTFactory.cc.

References BdbCollectionTFactory< T >::_collectionHint, BdbCollectionTFactory< T >::_failure, BdbCollectionTFactory< T >::_fullCollName, BdbCollectionTFactory< T >::_nodeHint, BdbCollectionTFactory< T >::_updatedCollHint, BdbcNoWait, BdbcSuccess, BdbHandle, BdbHandleAny, BdbStatus, BdbEventStore::collection(), BdbCollectionTFactory< T >::collName(), BdbCollectionTFactory< T >::createCollectionAtNode(), BdbEventStore::fetchTreeNode(), BdbCollectionTFactory< T >::fullCollName(), BdbCollectionTFactory< T >::getResult(), BdbCollectionTFactory< T >::initialSize(), BdbEventStore::instance(), BdbCollectionTFactory< T >::kExistsFailure, BdbCollectionTFactory< T >::kLockFailure, BdbCollectionTFactory< T >::kNoFailure, BdbCollectionTFactory< T >::lockError(), BdbDomainOODB::lockWait(), result, BdbEventStore::setLastPath(), BdbDomainOODB::setLockWait(), BdbPathName::stem(), and BdbAbstractClusteringHint::updatedHint().

Referenced by BdbCollectionTFactory< T >::getCollection(), and BdbCollectionTFactory< T >::regetCollection().

template<class T>
virtual BdbStatus BdbCollectionTFactory< T >::authError const char *    theName const [pure virtual]
 

action to take when there is an authorization failure

Implemented in BdbBridgeCollTFactory< T >, BdbCollTFactoryDecorator< T >, BdbTreeCollTFactory< T >, and BdbVectorCollTFactory< T >.

Referenced by BdbCollectionTFactory< T >::getCollection().

template<class T>
BdbCollectionTFactory< T >::BdbRef BdbTreeNodeP    [private]
 

template<class T>
BdbAbstractClusteringHint * BdbCollectionTFactory< T >::collectionHint   [protected, virtual]
 

Returns:
the hint to be used for the creation of the collection

Reimplemented in BdbCollTFactoryDecorator< T >, and BdbNestedTransCollTFactory< T >.

Definition at line 129 of file BdbCollectionTFactory.cc.

Referenced by BdbNestedTransCollTFactory< T >::collectionHint(), BdbVectorCollTFactory< T >::createAnonymousCollection(), and BdbCollectionTFactory< T >::factoryCollectionHint().

template<class T>
const char * BdbCollectionTFactory< T >::collName   [protected, virtual]
 

Returns:
the collection name last used to get or reget the collection

Reimplemented in BdbCollTFactoryDecorator< T >.

Definition at line 150 of file BdbCollectionTFactory.cc.

Referenced by BdbCollectionTFactory< T >::attemptGet(), BdbCollectionTFactory< T >::factoryCollName(), BdbCollectionTFactory< T >::getCollection(), and BdbCollectionTFactory< T >::regetCollection().

template<class T>
BdbAbsCollectionT< T > * BdbCollectionTFactory< T >::createCollectionAtNode BdbHandleAny &    theHint,
BdbHandle(BdbTreeNodeP)&    theNode,
const char *    theName,
d_ULong    theInitialSize
[private, virtual]
 

Returns:
the collection created by the factory at the specified node

Reimplemented in BdbBridgeCollTFactory< T >, BdbTreeCollTFactory< T >, and BdbVectorCollTFactory< T >.

Definition at line 413 of file BdbCollectionTFactory.cc.

References BdbHandleAny.

Referenced by BdbCollectionTFactory< T >::attemptGet().

template<class T>
virtual BdbStatus BdbCollectionTFactory< T >::existsError const char *    theName const [pure virtual]
 

action to take when the collection already exists

Implemented in BdbBridgeCollTFactory< T >, BdbCollTFactoryDecorator< T >, BdbTreeCollTFactory< T >, and BdbVectorCollTFactory< T >.

Referenced by BdbCollectionTFactory< T >::getCollection(), and BdbCollectionTFactory< T >::regetCollection().

template<class T>
BdbAbstractClusteringHint * BdbCollectionTFactory< T >::factoryCollectionHint BdbCollectionTFactory< T > &    factory [static, protected]
 

Returns:
the hint to be used for the creation of the collection

Definition at line 164 of file BdbCollectionTFactory.cc.

References BdbCollectionTFactory< T >::collectionHint().

Referenced by BdbNestedTransCollTFactory< T >::BdbNestedTransCollTFactory(), and BdbCollTFactoryDecorator< T >::collectionHint().

template<class T>
const char * BdbCollectionTFactory< T >::factoryCollName BdbCollectionTFactory< T > &    factory [static, protected]
 

Returns:
the collection name last used by the specified factory to get or reget the collection

Definition at line 185 of file BdbCollectionTFactory.cc.

References BdbCollectionTFactory< T >::collName().

Referenced by BdbCollTFactoryDecorator< T >::collName().

template<class T>
const char * BdbCollectionTFactory< T >::factoryFullCollName BdbCollectionTFactory< T > &    factory [static, protected]
 

Returns:
the full collection name last used by the specified factory to get or reget the collection

Definition at line 178 of file BdbCollectionTFactory.cc.

References BdbCollectionTFactory< T >::fullCollName().

Referenced by BdbFetchCollTFactory< T >::attemptRegets(), BdbCollTFactoryDecorator< T >::fullCollName(), and BdbFetchCollTFactory< T >::regetCollection().

template<class T>
BdbAbstractClusteringHint * BdbCollectionTFactory< T >::factoryNodeHint BdbCollectionTFactory< T > &    factory [static, protected]
 

Returns:
the hint to be used for the creation of the tree node by the specified factory

Definition at line 171 of file BdbCollectionTFactory.cc.

References BdbCollectionTFactory< T >::nodeHint().

Referenced by BdbNestedTransCollTFactory< T >::BdbNestedTransCollTFactory(), and BdbCollTFactoryDecorator< T >::nodeHint().

template<class T>
const char * BdbCollectionTFactory< T >::fullCollName   [protected, virtual]
 

Returns:
the full collection name last used to get or reget the collection

Reimplemented in BdbCollTFactoryDecorator< T >.

Definition at line 143 of file BdbCollectionTFactory.cc.

Referenced by BdbCollectionTFactory< T >::attemptGet(), BdbCollectionTFactory< T >::factoryFullCollName(), and BdbCollectionTFactory< T >::regetCollection().

template<class T>
BdbAbsCollectionT< T > * BdbCollectionTFactory< T >::getCollection const char *const    theCollPath,
d_ULong    initialSize = 0
[virtual]
 

Returns:
Collection, if attempt to get collection is succesful

Reimplemented in BdbCollTFactoryDecorator< T >, BdbFetchCollTFactory< T >, BdbMetaDataCollTFactory< T >, and BdbNestedTransCollTFactory< T >.

Definition at line 213 of file BdbCollectionTFactory.cc.

References BdbCollectionTFactory< T >::_collName, BdbCollectionTFactory< T >::_failure, BdbCollectionTFactory< T >::_fullCollName, BdbCollectionTFactory< T >::_initialSize, BdbCollectionTFactory< T >::_updatedCollHint, BdbCollectionTFactory< T >::attemptGet(), BdbCollectionTFactory< T >::authError(), BdbDomainAuth::AuthLevels, BdbEventStore::collection(), BdbCollectionTFactory< T >::collName(), BdbCollectionTFactory< T >::existsError(), BdbCollectionTFactory< T >::getResult(), BdbCollectionTFactory< T >::initialSize(), BdbEventStore::instance(), BdbCollectionTFactory< T >::kAuthFailure, BdbCollectionTFactory< T >::kExistsFailure, BdbCollectionTFactory< T >::kNameFailure, BdbCollectionTFactory< T >::kNoFailure, BdbPathName::leaf(), BdbCollectionTFactory< T >::nameError(), BdbDomainAuth::parseAuthLevel(), BdbDomainAuth::parseAuthName(), BdbDomainAuth::setAuthLevel(), and BdbPathName::stem().

Referenced by BdbCollectionCommand::createCollections(), BdbBridgeCollectionT< T >::destinationCollection(), and BdbOutputStream::locateCollection().

template<class T>
BdbCollectionTFactory< T >::Failure BdbCollectionTFactory< T >::getResult   [virtual]
 

Returns:
the result of the last 'getCollection' attempted

Reimplemented in BdbCollTFactoryDecorator< T >.

Definition at line 192 of file BdbCollectionTFactory.cc.

Referenced by BdbCollectionTFactory< T >::attemptGet(), BdbVectorCollTFactory< T >::authError(), BdbTreeCollTFactory< T >::authError(), BdbCollTFactoryDecorator< T >::authError(), BdbBridgeCollTFactory< T >::authError(), BdbCollectionCommand::createCollections(), BdbVectorCollTFactory< T >::existsError(), BdbTreeCollTFactory< T >::existsError(), BdbCollTFactoryDecorator< T >::existsError(), BdbBridgeCollTFactory< T >::existsError(), BdbCollectionTFactory< T >::getCollection(), BdbCollTFactoryDecorator< T >::getResult(), BdbVectorCollTFactory< T >::lockError(), BdbTreeCollTFactory< T >::lockError(), BdbCollTFactoryDecorator< T >::lockError(), BdbBridgeCollTFactory< T >::lockError(), BdbVectorCollTFactory< T >::nameError(), BdbTreeCollTFactory< T >::nameError(), BdbBridgeCollTFactory< T >::nameError(), and BdbCollectionTFactory< T >::regetCollection().

template<class T>
d_ULong BdbCollectionTFactory< T >::initialSize   [protected, virtual]
 

Returns:
the collection name last used to get or reget the collection

Definition at line 157 of file BdbCollectionTFactory.cc.

Referenced by BdbFetchCollTFactory< T >::attemptGet(), BdbCollectionTFactory< T >::attemptGet(), BdbNestedTransCollTFactory< T >::getCollection(), BdbMetaDataCollTFactory< T >::getCollection(), BdbFetchCollTFactory< T >::getCollection(), and BdbCollectionTFactory< T >::getCollection().

template<class T>
virtual BdbStatus BdbCollectionTFactory< T >::lockError const BdbRefAny &    persObj const [pure virtual]
 

action to take when the collection can not be updated

Implemented in BdbBridgeCollTFactory< T >, BdbCollTFactoryDecorator< T >, BdbTreeCollTFactory< T >, and BdbVectorCollTFactory< T >.

Referenced by BdbCollectionTFactory< T >::attemptGet().

template<class T>
virtual BdbStatus BdbCollectionTFactory< T >::nameError   [pure virtual]
 

action to take when no name is specfied for a collection

Implemented in BdbBridgeCollTFactory< T >, BdbCollTFactoryDecorator< T >, BdbTreeCollTFactory< T >, and BdbVectorCollTFactory< T >.

Referenced by BdbCollectionTFactory< T >::getCollection().

template<class T>
BdbAbstractClusteringHint * BdbCollectionTFactory< T >::nodeHint   [protected, virtual]
 

Returns:
the hint to be used for the creation of the tree node

Reimplemented in BdbCollTFactoryDecorator< T >, and BdbNestedTransCollTFactory< T >.

Definition at line 136 of file BdbCollectionTFactory.cc.

Referenced by BdbCollectionTFactory< T >::factoryNodeHint(), and BdbNestedTransCollTFactory< T >::nodeHint().

template<class T>
const BdbCollectionTFactory< T >& BdbCollectionTFactory< T >::operator= const BdbCollectionTFactory< T > &    aRhs [private]
 

stops default

template<class T>
BdbAbsCollectionT< T > * BdbCollectionTFactory< T >::regetCollection   [virtual]
 

Returns:
Collection, if re-attempt to get collection is succesful

Reimplemented in BdbCollTFactoryDecorator< T >, BdbFetchCollTFactory< T >, BdbMetaDataCollTFactory< T >, and BdbNestedTransCollTFactory< T >.

Definition at line 382 of file BdbCollectionTFactory.cc.

References BdbCollectionTFactory< T >::attemptGet(), BdbCollectionTFactory< T >::collName(), BdbCollectionTFactory< T >::existsError(), BdbCollectionTFactory< T >::fullCollName(), BdbCollectionTFactory< T >::getResult(), and BdbCollectionTFactory< T >::kExistsFailure.

Referenced by BdbFetchCollTFactory< T >::attemptRegets().

template<class T>
void BdbCollectionTFactory< T >::setHints BdbCollectionTFactory< T > &    factory,
BdbAbstractClusteringHint   collectionHint,
BdbAbstractClusteringHint   nodeHint
[static, protected]
 

Allows this factory to change the hints in another factory. (For use in factory decorators)

Definition at line 203 of file BdbCollectionTFactory.cc.

References BdbCollectionTFactory< T >::setInstanceHints().

Referenced by BdbNestedTransCollTFactory< T >::getCollection(), and BdbCollTFactoryDecorator< T >::setInstanceHints().

template<class T>
void BdbCollectionTFactory< T >::setInstanceHints BdbAbstractClusteringHint   collectionHint,
BdbAbstractClusteringHint   nodeHint
[protected, virtual]
 

Set the hints to be used by this instance.

Reimplemented in BdbCollTFactoryDecorator< T >, and BdbNestedTransCollTFactory< T >.

Definition at line 397 of file BdbCollectionTFactory.cc.

References BdbCollectionTFactory< T >::_collectionHint, and BdbCollectionTFactory< T >::_nodeHint.

Referenced by BdbNestedTransCollTFactory< T >::BdbNestedTransCollTFactory(), BdbCollectionTFactory< T >::setHints(), and BdbNestedTransCollTFactory< T >::setInstanceHints().

template<class T>
void BdbCollectionTFactory< T >::setResult Failure    [protected, virtual]
 

sets the result of the current 'getCollection'

Definition at line 406 of file BdbCollectionTFactory.cc.

References BdbCollectionTFactory< T >::_failure.

Referenced by BdbMetaDataCollTFactory< T >::addMetaData(), BdbFetchCollTFactory< T >::attemptGet(), BdbNestedTransCollTFactory< T >::getCollection(), BdbMetaDataCollTFactory< T >::getCollection(), BdbNestedTransCollTFactory< T >::regetCollection(), and BdbMetaDataCollTFactory< T >::regetCollection().

template<class T>
virtual const char* BdbCollectionTFactory< T >::typeName   [pure virtual]
 

Returns:
the name of the type of collection this factory creates

Implemented in BdbBridgeCollTFactory< T >, BdbCollTFactoryDecorator< T >, BdbTreeCollTFactory< T >, and BdbVectorCollTFactory< T >.

Referenced by BdbCollectionCommand::createCollections(), and BdbOutputStream::locateCollection().


Member Data Documentation

template<class T>
BdbAbstractClusteringHint* BdbCollectionTFactory< T >::_collectionHint [private]
 

Definition at line 250 of file BdbCollectionTFactory.hh.

Referenced by BdbCollectionTFactory< T >::attemptGet(), and BdbCollectionTFactory< T >::setInstanceHints().

template<class T>
char* BdbCollectionTFactory< T >::_collName [private]
 

Definition at line 257 of file BdbCollectionTFactory.hh.

Referenced by BdbCollectionTFactory< T >::getCollection(), and BdbCollectionTFactory< T >::~BdbCollectionTFactory().

template<class T>
Failure BdbCollectionTFactory< T >::_failure [private]
 

Definition at line 252 of file BdbCollectionTFactory.hh.

Referenced by BdbCollectionTFactory< T >::attemptGet(), BdbCollectionTFactory< T >::getCollection(), and BdbCollectionTFactory< T >::setResult().

template<class T>
char* BdbCollectionTFactory< T >::_fullCollName [private]
 

Definition at line 254 of file BdbCollectionTFactory.hh.

Referenced by BdbCollectionTFactory< T >::attemptGet(), BdbCollectionTFactory< T >::getCollection(), and BdbCollectionTFactory< T >::~BdbCollectionTFactory().

template<class T>
d_ULong BdbCollectionTFactory< T >::_initialSize [private]
 

Definition at line 258 of file BdbCollectionTFactory.hh.

Referenced by BdbCollectionTFactory< T >::getCollection().

template<class T>
BdbAbstractClusteringHint* BdbCollectionTFactory< T >::_nodeHint [private]
 

Definition at line 251 of file BdbCollectionTFactory.hh.

Referenced by BdbCollectionTFactory< T >::attemptGet(), and BdbCollectionTFactory< T >::setInstanceHints().

template<class T>
BdbRefAny BdbCollectionTFactory< T >::_updatedCollHint [private]
 

Definition at line 255 of file BdbCollectionTFactory.hh.

Referenced by BdbCollectionTFactory< T >::attemptGet(), and BdbCollectionTFactory< T >::getCollection().


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

 


BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us

Page Owner: Jacek Becla
Last Update: October 04, 2002