![]() |
ATLAS Offline Software
|
#include <CollectionBase/CollectionService.h>
Public Member Functions | |
CollectionService () | |
Constructor: More... | |
virtual | ~CollectionService () |
Default destructor. More... | |
virtual ICollection * | create (const ICollectionDescription &description, bool overwrite=false) |
Creates or overwrites a collection or collection fragment, given a description of its properties. More... | |
virtual ICollection * | createAndRegister (const ICollectionDescription &description, bool overwrite=false, std::string logicalName="") |
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 ICollection * | open (const std::string &name, const std::string &type, std::string connection="", bool readOnly=true) const |
virtual bool | registerExisting (const std::string &name, const std::string &type, std::string connection="", std::string logicalName="") |
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="") |
Registers an existing collection in a collection catalog managed by the collection service. More... | |
virtual ICollection * | handle (const std::string &name, const std::string &type, std::string connection="", bool readOnly=true, ISession *session=0) const |
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 ICollection * | openWithPhysicalName (const std::string &physicalName, pool::ICollection::OpenMode openMode=pool::ICollection::READ) |
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 ICollection * | openWithLogicalName (const std::string &logicalName, bool readOnly=true) |
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 ICollection * | openWithGuid (const std::string &guid, bool readOnly=true) |
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 () |
Sets default values for the write and read collection catalogs. More... | |
virtual void | setCatalog (IFileCatalog *collCat) |
Forces the service to use externally provided file catalogs The catalogs are not deleted by the service. More... | |
virtual bool | setWriteCatalog (const std::string &name) |
Sets the name of the catalog in which to register new collections. More... | |
virtual bool | addReadCatalog (const std::string &name) |
Adds a catalog to the list of catalogs in which to search for registered collections. More... | |
virtual IFileCatalog * | getCatalog () |
Returns the collection catalog used by the service. More... | |
A service for creating, accessing and managing an ensemble of collections of event references. In many cases, the individual unit managed by the service may simply consist of a collection fragment containing only a subset of the metadata of an existing collection. Note that a class that inherits from this interface must also inherit from the SEAL Service base class.
Definition at line 25 of file CollectionService.h.
pool::CollectionService::CollectionService | ( | ) |
Constructor:
context | Local context provided by the service. |
|
virtual |
Default destructor.
|
virtual |
Adds a catalog to the list of catalogs in which to search for registered collections.
name | Name of collection catalog to add to search list. |
Implements pool::ICollectionService.
|
virtual |
Creates or overwrites a collection or collection fragment, given a description of its properties.
description | Specification of collection or collection fragment properties. |
overwrite | Flag to distinguish creation and overwrite open modes. |
Implements pool::ICollectionService.
|
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.
description | Specification of collection properties. |
overwrite | Flag to distinguish creation and overwrite open modes. |
Implements pool::ICollectionService.
|
virtual |
Returns the collection catalog used by the service.
Implements pool::ICollectionService.
|
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".
name | Name of collection or collection fragment. |
type | Storage technology type of collection or collection fragment. |
connection | Connection to database containing collection or collection fragment. |
readOnly | Flag to distinguish read and update open modes. |
session | Reference to database session (need only be set for implicit collections). |
Implements pool::ICollectionService.
|
inlinevirtual |
Definition at line 66 of file CollectionService.h.
|
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.
guid | Globally unique identifier used to register collection in catalog. |
readOnly | Flag to distinguish read and update open modes. |
Implements pool::ICollectionService.
|
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.
logicalName | Logical name used to register collection in catalog. |
readOnly | Flag to distinguish read and update open modes. |
Implements pool::ICollectionService.
|
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.
physicalName | Physical name used to register collection in catalog. |
readOnly | Flag to distinguish read and update open modes. |
Implements pool::ICollectionService.
|
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.
name | Name of collection. |
type | Storage technology type of collection. |
connection | Connection to database containing collection. |
Implements pool::ICollectionService.
|
virtual |
Registers an existing collection in a collection catalog managed by the collection service.
collection | The collection to register |
overwrite | If true attempt to overwrite catalog entry for the same collection name |
logicalName | Logical name of the collection to store in the catalog |
Implements pool::ICollectionService.
|
virtual |
Forces the service to use externally provided file catalogs The catalogs are not deleted by the service.
Implements pool::ICollectionService.
|
virtual |
Sets default values for the write and read collection catalogs.
Implements pool::ICollectionService.
|
virtual |
Sets the name of the catalog in which to register new collections.
name | Name of collection catalog for registering collections. |
Implements pool::ICollectionService.