LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
Location of a persisted Persistable instance in a database. More...
#include <DbStorageLocation.h>
Public Types | |
typedef boost::shared_ptr < DbStorageLocation > | Ptr |
Public Types inherited from lsst::daf::base::Citizen | |
enum | { magicSentinel = 0xdeadbeef } |
typedef unsigned long | memId |
Type of the block's ID. More... | |
typedef memId(* | memNewCallback )(const memId cid) |
A function used to register a callback. More... | |
typedef memId(* | memCallback )(const Citizen *ptr) |
Public Member Functions | |
DbStorageLocation (void) | |
DbStorageLocation (std::string const &url) | |
virtual | ~DbStorageLocation (void) |
virtual std::string | toString (void) const |
virtual std::string | getConnString (void) const |
virtual std::string const & | getDbType (void) const |
virtual std::string const & | getHostname (void) const |
virtual std::string const & | getPort (void) const |
virtual std::string const & | getUsername (void) const |
virtual std::string const & | getPassword (void) const |
virtual std::string const & | getDbName (void) const |
Public Member Functions inherited from lsst::daf::base::Citizen | |
Citizen (const std::type_info &) | |
Citizen (Citizen const &) | |
~Citizen () | |
Citizen & | operator= (Citizen const &) |
std::string | repr () const |
Return a string representation of a Citizen. More... | |
void | markPersistent (void) |
Mark a Citizen as persistent and not destroyed until process end. More... | |
memId | getId () const |
Return the Citizen's ID. More... | |
Private Attributes | |
std::string | _dbType |
Database type (e.g. "mysql"). More... | |
std::string | _hostname |
std::string | _port |
std::string | _username |
std::string | _password |
std::string | _dbName |
Database (not server) name. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from lsst::daf::base::Citizen | |
static bool | hasBeenCorrupted () |
Check all allocated blocks for corruption. More... | |
static memId | getNextMemId () |
Return the memId of the next object to be allocated. More... | |
static int | init () |
Called once when the memory system is being initialised. More... | |
static int | census (int, memId startingMemId=0) |
How many active Citizens are there? More... | |
static void | census (std::ostream &stream, memId startingMemId=0) |
Print a list of all active Citizens to stream, sorted by ID. More... | |
static const std::vector < const Citizen * > * | census () |
Return a (newly allocated) std::vector of active Citizens sorted by ID. More... | |
static memId | setNewCallbackId (memId id) |
Call the NewCallback when block is allocated. More... | |
static memId | setDeleteCallbackId (memId id) |
Call the current DeleteCallback when block is deleted. More... | |
static memNewCallback | setNewCallback (memNewCallback func) |
Set the NewCallback function. More... | |
static memCallback | setDeleteCallback (memCallback func) |
Set the DeleteCallback function. More... | |
static memCallback | setCorruptionCallback (memCallback func) |
Set the CorruptionCallback function. More... | |
Location of a persisted Persistable instance in a database.
Provides database connection information for DbStorage. Can be initialized with either an all-in-one URL containing username and password information or a CORAL-style connection string URL with separate username and password.
Definition at line 58 of file DbStorageLocation.h.
typedef boost::shared_ptr<DbStorageLocation> lsst::daf::persistence::DbStorageLocation::Ptr |
Definition at line 60 of file DbStorageLocation.h.
lsst::daf::persistence::DbStorageLocation::DbStorageLocation | ( | void | ) |
Default constructor.
Definition at line 55 of file DbStorageLocation.cc.
lsst::daf::persistence::DbStorageLocation::DbStorageLocation | ( | std::string const & | url | ) |
Constructor from CORAL-style URL.
[in] | url | CORAL-style connection string (database type, hostname, port, database name) |
Definition at line 64 of file DbStorageLocation.cc.
|
virtual |
|
virtual |
Produce a CORAL-style connection string representation of the DbStorageLocation.
Definition at line 101 of file DbStorageLocation.cc.
|
virtual |
Accessor for database name.
Definition at line 143 of file DbStorageLocation.cc.
|
virtual |
Accessor for database type.
Definition at line 108 of file DbStorageLocation.cc.
|
virtual |
Accessor for database hostname.
Definition at line 115 of file DbStorageLocation.cc.
|
virtual |
Accessor for password.
Definition at line 136 of file DbStorageLocation.cc.
|
virtual |
Accessor for database port number.
Definition at line 122 of file DbStorageLocation.cc.
|
virtual |
Accessor for username.
Definition at line 129 of file DbStorageLocation.cc.
|
virtual |
Produce a string (URL) representation of the DbStorageLocation.
Definition at line 92 of file DbStorageLocation.cc.
|
private |
Database (not server) name.
Definition at line 81 of file DbStorageLocation.h.
|
private |
Database type (e.g. "mysql").
Definition at line 76 of file DbStorageLocation.h.
|
private |
Definition at line 77 of file DbStorageLocation.h.
|
private |
Definition at line 80 of file DbStorageLocation.h.
|
private |
Definition at line 78 of file DbStorageLocation.h.
|
private |
Definition at line 79 of file DbStorageLocation.h.