lsst.daf.persistence  13.0-11-gfc17871
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | List of all members
lsst::daf::persistence::Persistence Class Reference

Class implementing object persistence. More...

#include <Persistence.h>

Inheritance diagram for lsst::daf::persistence::Persistence:

Public Types

typedef std::shared_ptr
< Persistence
Ptr
 

Public Member Functions

virtual ~Persistence (void)
 Destructor. More...
 
virtual Storage::Ptr getPersistStorage (std::string const &storageType, LogicalLocation const &location)
 Create a Storage subclass configured to persist to a location. More...
 
virtual Storage::Ptr getRetrieveStorage (std::string const &storageType, LogicalLocation const &location)
 Create a Storage subclass configured to retrieve from a location. More...
 
virtual void persist (lsst::daf::base::Persistable const &persistable, Storage::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, Storage::List const &storageList, lsst::daf::base::PropertySet::Ptr additionalData)
 Retrieve a Persistable instance. More...
 
virtual
lsst::daf::base::Persistable * 
unsafeRetrieve (std::string const &persistableType, Storage::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...
 

Detailed Description

Class implementing object persistence.

This class persists and retrieves objects by calling Formatter subclasses with a sequence of Storage subclasses that have been configured with LogicalLocations. This class handles all transaction semantics by starting per-Storage transactions, detecting failures, and causing the Storage subclasses to roll back if necessary.

Definition at line 68 of file Persistence.h.

Member Typedef Documentation

Definition at line 70 of file Persistence.h.

Constructor & Destructor Documentation

lsst::daf::persistence::Persistence::~Persistence ( void  )
virtual

Destructor.

Definition at line 66 of file Persistence.cc.

Member Function Documentation

Persistence::Ptr lsst::daf::persistence::Persistence::getPersistence ( lsst::pex::policy::Policy::Ptr  policy)
static

Create a Persistence object.

Parameters
[in]policyPolicy to configure the Persistence object
Returns
Pointer to a Persistence instance

Definition at line 196 of file Persistence.cc.

Storage::Ptr lsst::daf::persistence::Persistence::getPersistStorage ( std::string const &  storageType,
LogicalLocation const &  location 
)
virtual

Create a Storage subclass configured to persist to a location.

Parameters
[in]storageTypeName of Storage subclass as registered in StorageRegistry
[in]locationLocation 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.

Returns
Pointer to Policy

Definition at line 205 of file Persistence.cc.

Storage::Ptr lsst::daf::persistence::Persistence::getRetrieveStorage ( std::string const &  storageType,
LogicalLocation const &  location 
)
virtual

Create a Storage subclass configured to retrieve from a location.

Parameters
[in]storageTypeName of Storage subclass as registered in StorageRegistry
[in]locationLocation to retrieve from (subclass-specific)

Definition at line 101 of file Persistence.cc.

void lsst::daf::persistence::Persistence::persist ( lsst::daf::base::Persistable const &  persistable,
Storage::List const &  storageList,
lsst::daf::base::PropertySet::Ptr  additionalData 
)
virtual

Persist a Persistable instance.

Parameters
[in]persistableThe Persistable instance
[in]storageListList of storages to persist to (in order)
[in]additionalDataAdditional information needed to determine the correct place to put data in any of the Storages

Definition at line 112 of file Persistence.cc.

lsst::daf::base::Persistable::Ptr lsst::daf::persistence::Persistence::retrieve ( std::string const &  persistableType,
Storage::List const &  storageList,
lsst::daf::base::PropertySet::Ptr  additionalData 
)
virtual

Retrieve a Persistable instance.

Parameters
[in]persistableTypeName of Persistable type to be retrieved as registered by its Formatter
[in]storageListList of storages to retrieve from (in order)
[in]additionalDataAdditional information needed to select the correct data from any of the Storages
Returns
Shared pointer to new Persistable instance

Definition at line 185 of file Persistence.cc.

lsst::daf::base::Persistable * lsst::daf::persistence::Persistence::unsafeRetrieve ( std::string const &  persistableType,
Storage::List const &  storageList,
lsst::daf::base::PropertySet::Ptr  additionalData 
)
virtual

Retrieve a Persistable instance, returning an unsafe bare pointer.

Intended for use by SWIG/Python only.

Parameters
[in]persistableTypeName of Persistable type to be retrieved as registered by its Formatter
[in]storageListList of storages to retrieve from (in order)
[in]additionalDataAdditional information needed to select the correct data from any of the Storages
Returns
Bare pointer to new Persistable instance

Definition at line 147 of file Persistence.cc.


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