|
LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
Abstract base class for storage implementations. More...
#include <Storage.h>
Public Types | |
| typedef boost::shared_ptr < Storage > | Ptr |
| typedef std::vector< Ptr > | List |
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 | |
| virtual | ~Storage (void) |
| virtual void | setPolicy (lsst::pex::policy::Policy::Ptr policy)=0 |
| virtual void | setPersistLocation (LogicalLocation const &location)=0 |
| virtual void | setRetrieveLocation (LogicalLocation const &location)=0 |
| virtual void | startTransaction (void)=0 |
| virtual void | endTransaction (void)=0 |
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... | |
Static Public Member Functions | |
| static Ptr | createInstance (std::string const &name, LogicalLocation const &location, bool persist, lsst::pex::policy::Policy::Ptr policy) |
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... | |
Protected Member Functions | |
| Storage (std::type_info const &type) | |
| void | verifyPathName (std::string const &pathName) |
Private Member Functions | |
| Storage (Storage const &) | |
| Storage & | operator= (Storage const &) |
Abstract base class for storage implementations.
All subclasses of this base class must be added to StorageRegistry.
| typedef std::vector<Ptr> lsst::daf::persistence::Storage::List |
| typedef boost::shared_ptr<Storage> lsst::daf::persistence::Storage::Ptr |
|
virtual |
|
explicitprotected |
Constructor.
| [in] | type | typeid() of subclass |
Definition at line 60 of file Storage.cc.
|
private |
|
static |
Create and configure a Storage subclass instance.
| [in] | name | Name of subclass |
| [in] | location | Location to persist to or retrieve from |
| [in] | persist | True if persisting, false if retrieving |
| [in] | policy | Policy used to configure the Storage |
Definition at line 75 of file Storage.cc.
|
pure virtual |
End an atomic transaction
Implemented in lsst::daf::persistence::DbTsvStorage, lsst::daf::persistence::DbStorage, lsst::daf::persistence::BoostStorage, lsst::daf::persistence::XmlStorage, and lsst::daf::persistence::FitsStorage.
|
pure virtual |
Set the destination for persistence.
| [in] | location | Location to persist to. |
Exclusive with setRetrieveLocation().
Implemented in lsst::daf::persistence::DbTsvStorage, lsst::daf::persistence::DbStorage, lsst::daf::persistence::BoostStorage, lsst::daf::persistence::XmlStorage, and lsst::daf::persistence::FitsStorage.
|
pure virtual |
Allow a Policy to be used to configure the Storage.
| [in] | policy | Should be called first, after construction. |
Implemented in lsst::daf::persistence::DbTsvStorage, lsst::daf::persistence::DbStorage, lsst::daf::persistence::BoostStorage, lsst::daf::persistence::XmlStorage, and lsst::daf::persistence::FitsStorage.
|
pure virtual |
Set the source for retrieval.
| [in] | location | Location to retrieve from. |
Exclusive with setPersistLocation().
Implemented in lsst::daf::persistence::DbTsvStorage, lsst::daf::persistence::DbStorage, lsst::daf::persistence::BoostStorage, lsst::daf::persistence::XmlStorage, and lsst::daf::persistence::FitsStorage.
|
pure virtual |
Begin an atomic transaction
Implemented in lsst::daf::persistence::DbTsvStorage, lsst::daf::persistence::DbStorage, lsst::daf::persistence::BoostStorage, lsst::daf::persistence::XmlStorage, and lsst::daf::persistence::FitsStorage.
|
protected |
Ensure that all directories along a path exist, creating them if necessary.
| [in] | name | Pathname to file to be created |
Definition at line 93 of file Storage.cc.
1.8.5