This is a singleton for managing all the data source catalog instances available in the system.
More...
#include <DataSourceCatalogManager.h>
This is a singleton for managing all the data source catalog instances available in the system.
- See also
- DataSource, DataSourceCatalog, te::common::Singleton
Definition at line 53 of file DataSourceCatalogManager.h.
◆ const_iterator
◆ iterator
◆ LockRead
typedef ObjectLevelLockingPolicy<::boost::lock_guard< ::boost::recursive_mutex > > te::common::ObjectLevelLockable< DataSourceCatalogManager , ::boost::recursive_mutex , ::boost::lock_guard< ::boost::recursive_mutex > , ::boost::lock_guard< ::boost::recursive_mutex > >::LockRead |
|
inherited |
◆ LockWrite
typedef ObjectLevelLockingPolicy<::boost::lock_guard< ::boost::recursive_mutex > > te::common::ObjectLevelLockable< DataSourceCatalogManager , ::boost::recursive_mutex , ::boost::lock_guard< ::boost::recursive_mutex > , ::boost::lock_guard< ::boost::recursive_mutex > >::LockWrite |
|
inherited |
◆ VolatileType
◆ DataSourceCatalogManager()
te::da::DataSourceCatalogManager::DataSourceCatalogManager |
( |
| ) |
|
|
protected |
It initializes the singleton instance of the data source catalog manager.
◆ ~DataSourceCatalogManager()
te::da::DataSourceCatalogManager::~DataSourceCatalogManager |
( |
| ) |
|
|
protected |
◆ begin() [1/2]
◆ begin() [2/2]
It returns an iterator to the beginning of the container.
- Returns
- A constant iterator to the beginning of the container.
Definition at line 209 of file DataSourceCatalogManager.h.
References m_catalogs.
◆ create()
It creates a catalog for the given data source, loads their sequences and the information about the schemas of the datasets contained in the data source. The catalog created is registered into the manager and it is returned to the caller.
- Parameters
-
ds | The data source whose catalog will be created. |
- Returns
- A pointer to the new data source catalog.
- Exceptions
-
Exception | It throws an exception if there is already a catalog to the given data source. |
- Note
- Thread-safe!
◆ detach() [1/2]
It changes the ownership of the data source catalog associated to the given data source.
- Parameters
-
- Returns
- The catalog associated to the given data source. The caller will take the ownership of this catalog.
- Note
- Thread-safe!
◆ detach() [2/2]
It changes the ownership of the data source catalog to the caller.
The memory used by the given data source catalog will NOT BE released.
In other words, you will take the ownership of the data source catalog.
- Parameters
-
ds | The data source catalog to be detached. |
- Note
- Thread-safe!
◆ detachAll() [1/2]
void te::da::DataSourceCatalogManager::detachAll |
( |
| ) |
|
All the catalogs are detached from the manager.
- Note
- Thread-safe!
◆ detachAll() [2/2]
void te::da::DataSourceCatalogManager::detachAll |
( |
const std::string & |
dsType | ) |
|
All the catalogs whose data sources are of the specified type are detached from the manager.
- Note
- Thread-safe!
◆ end() [1/2]
◆ end() [2/2]
◆ find()
bool te::da::DataSourceCatalogManager::find |
( |
const DataSourcePtr & |
ds | ) |
const |
It tries to find the catalog associated to the given data source.
- Parameters
-
ds | The data source whose catalog is to be found. |
- Returns
- True, if the catalog associated to the data source is found; otherwise, it returns false.
- Note
- Thread-safe!
◆ get()
It gets the catalog associated to the given data source. If there is no catalog registered in the manager, a catalog is created and registered in the manager.
- Parameters
-
ds | The data source whose catalog is to be retrieved. |
- Returns
- The catalog associated to the data source.
- Note
- Thread-safe!
◆ getInstance()
It returns a reference to the singleton instance.
- Returns
- A reference to the singleton instance.
Definition at line 109 of file Singleton.h.
◆ insert()
It inserts the data source catalog into the manager. The catalog must have a data source in order to be inserted.
- Parameters
-
catalog | The catalog to be inserted into the manager. |
- Note
- The manager will take the ownership of the catalog.
- Exceptions
-
Exception | It throws an exception, if already exists a catalog for the data source of the given catalog. |
- Note
- Thread-safe!
◆ size()
std::size_t te::da::DataSourceCatalogManager::size |
( |
| ) |
const |
|
inline |
It returns the number of data source catalogs that the manager are keeping track of.
- Returns
- The number of tracked data source catalogs.
Definition at line 204 of file DataSourceCatalogManager.h.
References m_catalogs.
◆ te::common::Singleton< DataSourceCatalogManager >
◆ m_catalogs
◆ m_mtx
The documentation for this class was generated from the following file: