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  

BdbDistribution Class Reference
[BdbDistTools]

#include <BdbDistribution.hh>

List of all members.

Public Methods

 BdbDistribution ()
virtual ~BdbDistribution ()
void setVerbose (d_Boolean mode)
d_Boolean verbose () const
BdbStatus attachDb (BdbDistFile &filepath, int dbid, d_Boolean chmodRead=d_False, BdbTString dbname=0, d_Boolean force=d_False)
BdbStatus detachDb (BdbTString dbname, int retry=0, int delay=60)
BdbStatus changeDb (BdbDistDatabase &db, BdbDistFile &filepath, d_Boolean chmodRead=d_False, d_Boolean force=d_False)
BdbStatus extractDb (BdbDistDatabase &db, BdbDistFile &outfile, d_Boolean supersed=d_False)
BdbStatus removeDb (BdbTString dbname, int retry=0, int delay=60)
BdbStatus shadowDb (BdbDistFile &filepath, int dbid)
BdbStatus replaceDb (BdbDistDatabase &db, BdbDistFile &impfile, d_Boolean chmodRead=d_False)
BdbStatus attachCollection (BdbTString pathname, BdbTString oid, d_Boolean force, d_Boolean fixTreeNode=d_False)
BdbStatus getFullDbs (ooTVArray(d_ULong)&dbs)
BdbStatus flushFullDbs (ooTVArray(d_ULong)&dbs)
BdbStatus clusteringRecordDb (BdbDistDatabase &db)
BdbStatus clusteringRecordDb (const char *dbname, const char *host, const char *filepath)
BdbStatus clusteringUnrecordDb (BdbDistDatabase &db)

Protected Methods

BdbTString logfile (const char *name, const char *suffix)
void verbose (BdbTString text)
void message (BdbTString text)
BdbStatus error (BdbTString text)
int execute (BdbTString command)
int catalogOperation (BdbTString command)
d_Boolean checkTransaction (int mode)
int getTransaction ()

Private Attributes

d_Boolean _externalTransaction


Constructor & Destructor Documentation

BdbDistribution::BdbDistribution  
 

Definition at line 53 of file BdbDistribution.cc.

BdbDistribution::~BdbDistribution   [virtual]
 

Definition at line 58 of file BdbDistribution.cc.


Member Function Documentation

BdbStatus BdbDistribution::attachCollection BdbTString    pathname,
BdbTString    oid,
d_Boolean    force,
d_Boolean    fixTreeNode = d_False
 

Definition at line 703 of file BdbDistribution.cc.

References BdbTreeAccess< T >::add(), BdbcSuccess, BdbcUpdate, BdbHandle, BdbRef, BdbStatus, buffer, checkTransaction(), BdbEventStore::collection(), error(), BdbEventStore::instance(), BdbTString::length(), BdbTreeNode::makeTo(), message(), BdbTreeNode::moveTo(), BdbTreeAccess< T >::remove(), and verbose().

Referenced by BdbDistDistributionCmd::command().

BdbStatus BdbDistribution::attachDb BdbDistFile   filepath,
int    dbid,
d_Boolean    chmodRead = d_False,
BdbTString    dbname = 0,
d_Boolean    force = d_False
 

Definition at line 174 of file BdbDistribution.cc.

References BdbDomain::activeInstance(), BdbcError, BdbcNoOpen, BdbcSuccess, BdbStatus, BdbDomainOODB::bootName(), catalogOperation(), checkTransaction(), BdbDistFile::chmodRead(), BdbDomainOODB::commit(), BdbTString::data(), BdbDistDatabase::dbid(), BdbDistDatabase::dbName(), error(), execute(), BdbDistFile::filePath(), BdbDistFile::fullPath(), BdbDistFile::host(), BdbDbNameParser::isAuthorized(), BdbDistDatabase::isDbExist(), BdbDistFile::isFileExist(), logfile(), message(), BdbDbNameParser::name(), BdbDomainOODB::startRead(), and verbose().

Referenced by BdbDistDistributionCmd::command(), and shadowDb().

int BdbDistribution::catalogOperation BdbTString    command [protected]
 

Definition at line 123 of file BdbDistribution.cc.

References BdbDomain::activeInstance(), BdbcNoOpen, BdbcRead, BdbcUpdate, BdbDomainOODB::commit(), execute(), getTransaction(), BdbDomainOODB::startRead(), and BdbDomainOODB::startUpdate().

Referenced by attachDb(), and detachDb().

BdbStatus BdbDistribution::changeDb BdbDistDatabase   db,
BdbDistFile   filepath,
d_Boolean    chmodRead = d_False,
d_Boolean    force = d_False
 

Definition at line 329 of file BdbDistribution.cc.

References BdbcSuccess, BdbcUpdate, BdbDBObj, BdbRef, BdbStatus, checkTransaction(), BdbDistFile::chmodRead(), BdbDistDatabase::dbName(), error(), execute(), BdbDistFile::filePath(), BdbDistFile::fullPath(), BdbDistFile::host(), host, BdbDbNameParser::isAuthorized(), BdbDistDatabase::isDbExist(), BdbDistFile::isFileExist(), BdbTFileSystem::localHostName(), BdbDistDatabase::lock(), logfile(), BdbDbNameParser::name(), and verbose().

Referenced by BdbDistDistributionCmd::command(), removeDb(), replaceDb(), and shadowDb().

d_Boolean BdbDistribution::checkTransaction int    mode [protected]
 

Definition at line 141 of file BdbDistribution.cc.

References _externalTransaction, BdbDomain::activeInstance(), BdbcNoOpen, BdbcUpdate, d_False, d_True, and BdbDomainOODB::mode().

Referenced by attachCollection(), attachDb(), changeDb(), clusteringRecordDb(), clusteringUnrecordDb(), detachDb(), error(), extractDb(), flushFullDbs(), removeDb(), replaceDb(), and shadowDb().

BdbStatus BdbDistribution::clusteringRecordDb const char *    dbname,
const char *    host,
const char *    filepath
 

Definition at line 930 of file BdbDistribution.cc.

References BdbcSuccess, BdbcUpdate, BdbStatus, checkTransaction(), error(), file, host, BdbDbTreeSingleton::instance(), BdbDbNameParser::isAuthorized(), BdbDbTreeSingleton::registerDb(), and verbose().

BdbStatus BdbDistribution::clusteringRecordDb BdbDistDatabase   db
 

Definition at line 902 of file BdbDistribution.cc.

References BdbcSuccess, BdbcUpdate, BdbStatus, checkTransaction(), BdbDistDatabase::dbName(), error(), BdbDistFile::filePath(), BdbDistFile::host(), BdbDbTreeSingleton::instance(), BdbDbNameParser::isAuthorized(), BdbDistDatabase::isDbExist(), BdbDbTreeSingleton::registerDb(), and verbose().

Referenced by BdbDistDistributionCmd::command().

BdbStatus BdbDistribution::clusteringUnrecordDb BdbDistDatabase   db
 

Definition at line 961 of file BdbDistribution.cc.

References BdbcSuccess, BdbcUpdate, BdbStatus, checkTransaction(), BdbDistDatabase::dbName(), error(), BdbDistFile::filePath(), BdbDistFile::host(), BdbDbTreeSingleton::instance(), BdbDbNameParser::isAuthorized(), BdbDistDatabase::isDbExist(), BdbDbTreeSingleton::unregisterDb(), and verbose().

Referenced by BdbDistDistributionCmd::command().

BdbStatus BdbDistribution::detachDb BdbTString    dbname,
int    retry = 0,
int    delay = 60
 

Definition at line 256 of file BdbDistribution.cc.

References BdbDomain::activeInstance(), BdbcError, BdbcNoOpen, BdbcSuccess, BdbStatus, BdbDomainOODB::bootName(), catalogOperation(), checkTransaction(), BdbDomainOODB::commit(), BdbTString::data(), error(), execute(), BdbDbNameParser::isAuthorized(), logfile(), message(), BdbDomainOODB::startRead(), and verbose().

Referenced by BdbDistDistributionCmd::command(), removeDb(), and shadowDb().

BdbStatus BdbDistribution::error BdbTString    text [protected]
 

Definition at line 103 of file BdbDistribution.cc.

References _externalTransaction, BdbDomainOODB::abort(), BdbDomain::activeInstance(), BdbcError, BdbcNoOpen, BdbStatus, checkTransaction(), and message().

Referenced by attachCollection(), attachDb(), changeDb(), clusteringRecordDb(), clusteringUnrecordDb(), detachDb(), extractDb(), flushFullDbs(), removeDb(), replaceDb(), and shadowDb().

int BdbDistribution::execute BdbTString    command [protected]
 

Definition at line 116 of file BdbDistribution.cc.

References verbose().

Referenced by attachDb(), catalogOperation(), changeDb(), detachDb(), and shadowDb().

BdbStatus BdbDistribution::extractDb BdbDistDatabase   db,
BdbDistFile   outfile,
d_Boolean    supersed = d_False
 

Definition at line 414 of file BdbDistribution.cc.

References _externalTransaction, BdbDomain::activeInstance(), BdbcNoOpen, BdbcSuccess, BdbStatus, checkTransaction(), BdbDomainOODB::commit(), BdbDistFile::copy(), BdbDistDatabase::dbName(), error(), BdbDistFile::fileSize(), BdbDistFile::fullPath(), BdbDistDatabase::isDbExist(), BdbDistFile::isFileExist(), BdbDistDatabase::lock(), BdbDistFile::remove(), size, BdbDomainOODB::startRead(), and verbose().

Referenced by BdbDistDistributionCmd::command().

BdbStatus BdbDistribution::flushFullDbs ooTVArray(d_ULong)&    dbs
 

Definition at line 869 of file BdbDistribution.cc.

References _externalTransaction, BdbDomain::activeInstance(), BdbcNoOpen, BdbStatus, checkTransaction(), BdbDomainOODB::commit(), error(), estore, BdbDomainName::Events, BdbEventStore::instance(), BdbAuth::instance(), BdbAuth::isAuthorized(), BdbEvsClusteringHint::removeFullDbsFromRegistry(), BdbDomainOODB::startRead(), BdbDomainAuth::System, and verbose().

Referenced by BdbDistDistributionCmd::command().

BdbStatus BdbDistribution::getFullDbs ooTVArray(d_ULong)&    dbs
 

Definition at line 851 of file BdbDistribution.cc.

References BdbStatus, estore, BdbEvsClusteringHint::getAllFullDbs(), BdbEventStore::instance(), and verbose().

Referenced by BdbDistDistributionCmd::command().

int BdbDistribution::getTransaction   [protected]
 

Definition at line 156 of file BdbDistribution.cc.

References BdbDomain::activeInstance(), and BdbDomainOODB::mode().

Referenced by catalogOperation().

BdbTString BdbDistribution::logfile const char *    name,
const char *    suffix
[protected]
 

Definition at line 75 of file BdbDistribution.cc.

Referenced by attachDb(), changeDb(), detachDb(), and shadowDb().

void BdbDistribution::message BdbTString    text [protected]
 

Definition at line 98 of file BdbDistribution.cc.

References BdbTString::data(), and BdbDistMessage::warning().

Referenced by attachCollection(), attachDb(), detachDb(), error(), replaceDb(), and shadowDb().

BdbStatus BdbDistribution::removeDb BdbTString    dbname,
int    retry = 0,
int    delay = 60
 

Definition at line 489 of file BdbDistribution.cc.

References BdbDomainOODB::abort(), BdbDomain::activeInstance(), BdbcSuccess, BdbcUpdate, BdbStatus, changeDb(), checkTransaction(), BdbDomainOODB::commit(), d_True, BdbTString::data(), detachDb(), error(), BdbDbNameParser::isAuthorized(), BdbDistDatabase::isDbExist(), BdbDistDatabase::lock(), BdbDomainOODB::startRead(), and verbose().

Referenced by BdbDistDistributionCmd::command().

BdbStatus BdbDistribution::replaceDb BdbDistDatabase   db,
BdbDistFile   impfile,
d_Boolean    chmodRead = d_False
 

Definition at line 636 of file BdbDistribution.cc.

References BdbcSuccess, BdbcUpdate, BdbStatus, changeDb(), checkTransaction(), BdbDistDatabase::dbName(), BdbDistFile::directory(), error(), BdbDistFile::fileName(), BdbDistFile::filePath(), BdbDistFile::fullPath(), BdbDistFile::host(), BdbDbNameParser::isAuthorized(), BdbDistDatabase::isDbExist(), BdbDistFile::isFileExist(), BdbDistDatabase::lock(), message(), BdbDistFile::pudPort(), BdbDistFile::remove(), BdbDistFile::rename(), and verbose().

Referenced by BdbDistDistributionCmd::command().

void BdbDistribution::setVerbose d_Boolean    mode
 

Definition at line 64 of file BdbDistribution.cc.

BdbStatus BdbDistribution::shadowDb BdbDistFile   filepath,
int    dbid
 

Definition at line 540 of file BdbDistribution.cc.

References BdbDomainOODB::abort(), BdbDomain::activeInstance(), attachDb(), BdbcNoOpen, BdbcSuccess, BdbStatus, BdbDomainOODB::bootName(), changeDb(), checkTransaction(), BdbDomainOODB::commit(), d_False, d_True, BdbTString::data(), BdbDistDatabase::dbid(), BdbDistDatabase::dbName(), detachDb(), BdbDomainOODB::dirName(), error(), execute(), BdbDistFile::filePath(), BdbDistFile::fullPath(), BdbDistFile::host(), BdbDomainOODB::hostName(), BdbDbNameParser::isAuthorized(), BdbDistDatabase::isDbExist(), BdbDistFile::isFileExist(), logfile(), message(), BdbDbNameParser::name(), BdbDistFile::remove(), BdbDomainOODB::startUpdate(), and verbose().

Referenced by BdbDistDistributionCmd::command().

d_Boolean BdbDistribution::verbose  
 

Definition at line 69 of file BdbDistribution.cc.

Referenced by attachCollection(), attachDb(), changeDb(), clusteringRecordDb(), clusteringUnrecordDb(), detachDb(), execute(), extractDb(), flushFullDbs(), getFullDbs(), removeDb(), replaceDb(), and shadowDb().

void BdbDistribution::verbose BdbTString    text [protected]
 

Definition at line 93 of file BdbDistribution.cc.

References BdbTString::data(), and BdbDistMessage::verbose().


Member Data Documentation

d_Boolean BdbDistribution::_externalTransaction [private]
 

Definition at line 90 of file BdbDistribution.hh.

Referenced by checkTransaction(), error(), extractDb(), and flushFullDbs().


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