lsst.daf.persistence
13.0-17-gd5d205a+2
|
Class implementing object persistence. More...
#include <Persistence.h>
Public Types | |
typedef std::shared_ptr < Persistence > | Ptr |
Public Member Functions | |
virtual | ~Persistence (void) |
Destructor. More... | |
virtual FormatterStorage::Ptr | getPersistStorage (std::string const &storageType, LogicalLocation const &location) |
Create a FormatterStorage subclass configured to persist to a location. More... | |
virtual FormatterStorage::Ptr | getRetrieveStorage (std::string const &storageType, LogicalLocation const &location) |
Create a FormatterStorage subclass configured to retrieve from a location. More... | |
virtual void | persist (lsst::daf::base::Persistable const &persistable, FormatterStorage::List const &storageList, lsst::daf::base::PropertySet::Ptr additionalData) |
Persist a Persistable instance. More... | |
virtual lsst::daf::base::Persistable::Ptr | retrieve (std::string const &persistableType, FormatterStorage::List const &storageList, lsst::daf::base::PropertySet::Ptr additionalData) |
Retrieve a Persistable instance. More... | |
virtual lsst::daf::base::Persistable * | unsafeRetrieve (std::string const &persistableType, FormatterStorage::List const &storageList, lsst::daf::base::PropertySet::Ptr additionalData) |
Retrieve a Persistable instance, returning an unsafe bare pointer. More... | |
lsst::pex::policy::Policy::Ptr | getPolicy () const |
Return the policy used to configure the Persistence object. More... | |
Static Public Member Functions | |
static Ptr | getPersistence (lsst::pex::policy::Policy::Ptr policy) |
Create a Persistence object. More... | |
Class implementing object persistence.
This class persists and retrieves objects by calling Formatter subclasses with a sequence of FormatterStorage subclasses that have been configured with LogicalLocations. This class handles all transaction semantics by starting per-FormatterStorage transactions, detecting failures, and causing the FormatterStorage subclasses to roll back if necessary.
Definition at line 68 of file Persistence.h.
typedef std::shared_ptr<Persistence> lsst::daf::persistence::Persistence::Ptr |
Definition at line 70 of file Persistence.h.
|
virtual |
Destructor.
Definition at line 66 of file Persistence.cc.
|
static |
Create a Persistence object.
[in] | policy | Policy to configure the Persistence object |
Definition at line 196 of file Persistence.cc.
|
virtual |
Create a FormatterStorage subclass configured to persist to a location.
[in] | storageType | Name of FormatterStorage subclass as registered in StorageRegistry |
[in] | location | Location to persist to (subclass-specific) |
Definition at line 91 of file Persistence.cc.
lsst::pex::policy::Policy::Ptr lsst::daf::persistence::Persistence::getPolicy | ( | ) | const |
Return the policy used to configure the Persistence object.
Definition at line 205 of file Persistence.cc.
|
virtual |
Create a FormatterStorage subclass configured to retrieve from a location.
[in] | storageType | Name of FormatterStorage subclass as registered in StorageRegistry |
[in] | location | Location to retrieve from (subclass-specific) |
Definition at line 101 of file Persistence.cc.
|
virtual |
Persist a Persistable instance.
[in] | persistable | The Persistable instance |
[in] | storageList | List of storages to persist to (in order) |
[in] | additionalData | Additional information needed to determine the correct place to put data in any of the Storages |
Definition at line 112 of file Persistence.cc.
|
virtual |
Retrieve a Persistable instance.
[in] | persistableType | Name of Persistable type to be retrieved as registered by its Formatter |
[in] | storageList | List of storages to retrieve from (in order) |
[in] | additionalData | Additional information needed to select the correct data from any of the FormatterStorages |
Definition at line 185 of file Persistence.cc.
|
virtual |
Retrieve a Persistable instance, returning an unsafe bare pointer.
Intended for use by SWIG/Python only.
[in] | persistableType | Name of Persistable type to be retrieved as registered by its Formatter |
[in] | storageList | List of storages to retrieve from (in order) |
[in] | additionalData | Additional information needed to select the correct data from any of the Storages |
Definition at line 147 of file Persistence.cc.