/* * @project The CERN Tape Archive (CTA) * @copyright Copyright © 2021-2022 CERN * @license This program is free software, distributed under the terms of the GNU General Public * Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". You can * redistribute it and/or modify it under the terms of the GPL Version 3, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU General Public License for more details. * * In applying this licence, CERN does not waive the privileges and immunities * granted to it by virtue of its status as an Intergovernmental Organization or * submit itself to any jurisdiction. */ #include #include "catalogue/retrywrappers/AdminUserCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/ArchiveFileCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/ArchiveRouteCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/CatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/DiskInstanceCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/DiskInstanceSpaceCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/DiskSystemCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/DriveConfigCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/DriveStateCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/FileRecycleLogCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/LogicalLibraryCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/PhysicalLibraryCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/MediaTypeCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/MountPolicyCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/RequesterActivityMountRuleCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/RequesterGroupMountRuleCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/RequesterMountRuleCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/retryOnLostConnection.hpp" #include "catalogue/retrywrappers/SchemaCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/StorageClassCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/TapeCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/TapeFileCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/TapePoolCatalogueRetryWrapper.hpp" #include "catalogue/retrywrappers/VirtualOrganizationCatalogueRetryWrapper.hpp" namespace cta::catalogue { CatalogueRetryWrapper::CatalogueRetryWrapper(log::Logger &log, std::unique_ptr catalogue, const uint32_t maxTriesToConnect): m_log(log), m_catalogue(std::move(catalogue)), m_maxTriesToConnect(maxTriesToConnect), m_schema(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_adminUser(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_diskSystem(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_diskInstance(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_diskInstanceSpace(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_vo(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_archiveRoute(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_mediaType(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_storageClass(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_tapePool(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_tape(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_mountPolicy(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_requesterActivityMountRule(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_requesterMountRule(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_requesterGroupMountRule(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_logicalLibrary(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_physicalLibrary(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_tapeFile(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_fileRecycleLog(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_driveConfig(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_driveState(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)), m_archiveFile(std::make_unique(m_catalogue, m_log, m_maxTriesToConnect)) { } const std::unique_ptr& CatalogueRetryWrapper::Schema() { return m_schema; } const std::unique_ptr& CatalogueRetryWrapper::AdminUser() { return m_adminUser; } const std::unique_ptr& CatalogueRetryWrapper::DiskSystem() { return m_diskSystem; } const std::unique_ptr& CatalogueRetryWrapper::DiskInstance() { return m_diskInstance; } const std::unique_ptr& CatalogueRetryWrapper::DiskInstanceSpace() { return m_diskInstanceSpace; } const std::unique_ptr& CatalogueRetryWrapper::VO() { return m_vo; } const std::unique_ptr& CatalogueRetryWrapper::ArchiveRoute() { return m_archiveRoute; } const std::unique_ptr& CatalogueRetryWrapper::MediaType() { return m_mediaType; } const std::unique_ptr& CatalogueRetryWrapper::StorageClass() { return m_storageClass; } const std::unique_ptr& CatalogueRetryWrapper::TapePool() { return m_tapePool; } const std::unique_ptr& CatalogueRetryWrapper::Tape() { return m_tape; } const std::unique_ptr& CatalogueRetryWrapper::MountPolicy() { return m_mountPolicy; } const std::unique_ptr& CatalogueRetryWrapper::RequesterActivityMountRule() { return m_requesterActivityMountRule; } const std::unique_ptr& CatalogueRetryWrapper::RequesterMountRule() { return m_requesterMountRule; } const std::unique_ptr& CatalogueRetryWrapper::RequesterGroupMountRule() { return m_requesterGroupMountRule; } const std::unique_ptr& CatalogueRetryWrapper::LogicalLibrary() { return m_logicalLibrary; } const std::unique_ptr& CatalogueRetryWrapper::PhysicalLibrary() { return m_physicalLibrary; } const std::unique_ptr& CatalogueRetryWrapper::TapeFile() { return m_tapeFile; } const std::unique_ptr& CatalogueRetryWrapper::FileRecycleLog() { return m_fileRecycleLog; } const std::unique_ptr& CatalogueRetryWrapper::DriveConfig() { return m_driveConfig; } const std::unique_ptr& CatalogueRetryWrapper::ArchiveFile() { return m_archiveFile; } const std::unique_ptr& CatalogueRetryWrapper::DriveState() { return m_driveState; } } // namespace cta::catalogue