ATLAS Offline Software
Public Member Functions | Protected Member Functions | List of all members
pool::ICollectionService Class Referenceabstract

#include <CollectionBase/ICollectionService.h>

Inheritance diagram for pool::ICollectionService:
Collaboration diagram for pool::ICollectionService:

Public Member Functions

virtual ICollectioncreate (const ICollectionDescription &description, bool overwrite=false)=0
 Creates or overwrites a collection or collection fragment, given a description of its properties. More...
 
virtual ICollectioncreateAndRegister (const ICollectionDescription &description, bool overwrite=false, std::string logicalName="")=0
 Creates or overwrites a collection, given a description of its properties, and registers it in a collection catalog managed by the collection service. More...
 
virtual bool registerExisting (const std::string &name, const std::string &type, std::string connection="", std::string logicalName="")=0
 Registers an existing collection in a collection catalog managed by the collection service, given its name, storage technology type and database connection string. More...
 
virtual bool registerExisting (ICollection *collection, bool overwrite=false, std::string logicalName="")=0
 Registers an existing collection in a collection catalog managed by the collection service. More...
 
virtual ICollectionhandle (const std::string &name, const std::string &type, std::string connection="", bool readOnly=true, ISession *session=0) const =0
 Retrieves a handle to an existing collection or collection fragment for read or update transactions, given the collection or collection fragment's name, storage technology type and database connection string. More...
 
virtual ICollectionopenWithPhysicalName (const std::string &physicalName, pool::ICollection::OpenMode openMode=pool::ICollection::READ)=0
 Retrieves a handle to an existing collection for read or update transactions, given the physical name used to register the collection in a collection catalog managed by the collection service. More...
 
virtual ICollectionopenWithLogicalName (const std::string &logicalName, bool readOnly=true)=0
 Retrieves a handle to an existing collection for read or update transactions, given the logical name used to register the collection in a collection catalog managed by the collection service. More...
 
virtual ICollectionopenWithGuid (const std::string &guid, bool readOnly=true)=0
 Retrieves a handle to an existing collection for read or update transactions, given the globally unique identifier used to register the collection in a collection catalog managed by the collection service. More...
 
virtual bool setDefaultCatalog ()=0
 Sets default values for the write and read collection catalogs. More...
 
virtual bool setWriteCatalog (const std::string &name)=0
 Sets the name of the catalog in which to register new collections. More...
 
virtual bool addReadCatalog (const std::string &name)=0
 Adds a catalog to the list of catalogs in which to search for registered collections. More...
 
virtual IFileCataloggetCatalog ()=0
 Returns the collection catalog used by the service. More...
 
virtual void setCatalog (IFileCatalog *collCat)=0
 Forces the service to use externally provided file catalogs The catalogs are not deleted by the service. More...
 

Protected Member Functions

virtual ~ICollectionService ()
 Empty destructor. More...
 

Detailed Description

An interface to a service for creating, accessing and managing an ensemble of collections of event references. In many cases, an object managed by the service may simply consist of a "collection fragment" which contains metadata but no event references and is meant to be added to a collection. Note that a class that inherits from this interface must also inherit from the SEAL Service base class.

Definition at line 32 of file ICollectionService.h.

Constructor & Destructor Documentation

◆ ~ICollectionService()

virtual pool::ICollectionService::~ICollectionService ( )
inlineprotectedvirtual

Empty destructor.

Definition at line 174 of file ICollectionService.h.

174 {}

Member Function Documentation

◆ addReadCatalog()

virtual bool pool::ICollectionService::addReadCatalog ( const std::string &  name)
pure virtual

Adds a catalog to the list of catalogs in which to search for registered collections.

Parameters
nameName of collection catalog to add to search list.

Implemented in pool::CollectionService.

◆ create()

virtual ICollection* pool::ICollectionService::create ( const ICollectionDescription description,
bool  overwrite = false 
)
pure virtual

Creates or overwrites a collection or collection fragment, given a description of its properties.

Parameters
descriptionSpecification of collection or collection fragment properties.
overwriteFlag to distinguish creation and overwrite open modes.

Implemented in pool::CollectionService.

◆ createAndRegister()

virtual ICollection* pool::ICollectionService::createAndRegister ( const ICollectionDescription description,
bool  overwrite = false,
std::string  logicalName = "" 
)
pure virtual

Creates or overwrites a collection, given a description of its properties, and registers it in a collection catalog managed by the collection service.

Throws an exception if the collection has been replicated, if an attempt is being made to overwrite an existing collection when the overwrite input argument has been set to "false" or if the object being registered is a collection fragment.

Parameters
descriptionSpecification of collection properties.
overwriteFlag to distinguish creation and overwrite open modes.

Implemented in pool::CollectionService.

◆ getCatalog()

virtual IFileCatalog* pool::ICollectionService::getCatalog ( )
pure virtual

Returns the collection catalog used by the service.

Implemented in pool::CollectionService.

◆ handle()

virtual ICollection* pool::ICollectionService::handle ( const std::string &  name,
const std::string &  type,
std::string  connection = "",
bool  readOnly = true,
ISession session = 0 
) const
pure virtual

Retrieves a handle to an existing collection or collection fragment for read or update transactions, given the collection or collection fragment's name, storage technology type and database connection string.

A reference to a POOL database session object must be provided as input for the case where the collection being accessed is of type "ImplicitCollection".

Parameters
nameName of collection or collection fragment.
typeStorage technology type of collection or collection fragment.
connectionConnection to database containing collection or collection fragment.
readOnlyFlag to distinguish read and update open modes.
sessionReference to database session (need only be set for implicit collections).

Implemented in pool::CollectionService.

◆ openWithGuid()

virtual ICollection* pool::ICollectionService::openWithGuid ( const std::string &  guid,
bool  readOnly = true 
)
pure virtual

Retrieves a handle to an existing collection for read or update transactions, given the globally unique identifier used to register the collection in a collection catalog managed by the collection service.

Throws an exception if a collection with this GUID cannot be found in the catalog.

Parameters
guidGlobally unique identifier used to register collection in catalog.
readOnlyFlag to distinguish read and update open modes.

Implemented in pool::CollectionService.

◆ openWithLogicalName()

virtual ICollection* pool::ICollectionService::openWithLogicalName ( const std::string &  logicalName,
bool  readOnly = true 
)
pure virtual

Retrieves a handle to an existing collection for read or update transactions, given the logical name used to register the collection in a collection catalog managed by the collection service.

Throws an exception if a collection with this logical name cannot be found in the catalog.

Parameters
logicalNameLogical name used to register collection in catalog.
readOnlyFlag to distinguish read and update open modes.

Implemented in pool::CollectionService.

◆ openWithPhysicalName()

virtual ICollection* pool::ICollectionService::openWithPhysicalName ( const std::string &  physicalName,
pool::ICollection::OpenMode  openMode = pool::ICollection::READ 
)
pure virtual

Retrieves a handle to an existing collection for read or update transactions, given the physical name used to register the collection in a collection catalog managed by the collection service.

Throws an exception if a collection with this physical name cannot be found in the catalog.

Parameters
physicalNamePhysical name used to register collection in catalog.
readOnlyFlag to distinguish read and update open modes.

Implemented in pool::CollectionService.

◆ registerExisting() [1/2]

virtual bool pool::ICollectionService::registerExisting ( const std::string &  name,
const std::string &  type,
std::string  connection = "",
std::string  logicalName = "" 
)
pure virtual

Registers an existing collection in a collection catalog managed by the collection service, given its name, storage technology type and database connection string.

Throws an exception if the collection does not exist, if a collection has already been registered in the collection catalog with identical physical name or if the object being registered is a collection fragment.

Parameters
nameName of collection.
typeStorage technology type of collection.
connectionConnection to database containing collection.

Implemented in pool::CollectionService.

◆ registerExisting() [2/2]

virtual bool pool::ICollectionService::registerExisting ( ICollection collection,
bool  overwrite = false,
std::string  logicalName = "" 
)
pure virtual

Registers an existing collection in a collection catalog managed by the collection service.


Parameters
collectionThe collection to register
overwriteIf true attempt to overwrite catalog entry for the same collection name
logicalNameLogical name of the collection to store in the catalog

Implemented in pool::CollectionService.

◆ setCatalog()

virtual void pool::ICollectionService::setCatalog ( IFileCatalog collCat)
pure virtual

Forces the service to use externally provided file catalogs The catalogs are not deleted by the service.

Implemented in pool::CollectionService.

◆ setDefaultCatalog()

virtual bool pool::ICollectionService::setDefaultCatalog ( )
pure virtual

Sets default values for the write and read collection catalogs.

Implemented in pool::CollectionService.

◆ setWriteCatalog()

virtual bool pool::ICollectionService::setWriteCatalog ( const std::string &  name)
pure virtual

Sets the name of the catalog in which to register new collections.

Parameters
nameName of collection catalog for registering collections.

Implemented in pool::CollectionService.


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