mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
renamed cloneObject to clone in IExternalLoadable [#CLICKHOUSE-3305]
This commit is contained in:
parent
c3d104f53b
commit
2e6b1dfd92
@ -469,7 +469,7 @@ bool CatBoostModel::isModified() const
|
||||
return true;
|
||||
}
|
||||
|
||||
std::unique_ptr<IExternalLoadable> CatBoostModel::cloneObject() const
|
||||
std::unique_ptr<IExternalLoadable> CatBoostModel::clone() const
|
||||
{
|
||||
return std::make_unique<CatBoostModel>(name, model_path, lib_path, lifetime, float_features_count, cat_features_count);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
|
||||
bool isModified() const override;
|
||||
|
||||
std::unique_ptr<IExternalLoadable> cloneObject() const override;
|
||||
std::unique_ptr<IExternalLoadable> clone() const override;
|
||||
|
||||
std::exception_ptr getCreationException() const override { return creation_exception; }
|
||||
|
||||
|
@ -41,8 +41,6 @@ struct IDictionaryBase : public IExternalLoadable
|
||||
|
||||
virtual bool isCached() const = 0;
|
||||
|
||||
virtual std::unique_ptr<IExternalLoadable> clone() const = 0;
|
||||
|
||||
virtual const IDictionarySource * getSource() const = 0;
|
||||
|
||||
virtual const DictionaryStructure & getStructure() const = 0;
|
||||
@ -61,11 +59,6 @@ struct IDictionaryBase : public IExternalLoadable
|
||||
return source && source->isModified();
|
||||
}
|
||||
|
||||
std::unique_ptr<IExternalLoadable> cloneObject() const override
|
||||
{
|
||||
return clone();
|
||||
}
|
||||
|
||||
std::shared_ptr<IDictionaryBase> shared_from_this()
|
||||
{
|
||||
return std::static_pointer_cast<IDictionaryBase>(IExternalLoadable::shared_from_this());
|
||||
|
@ -127,7 +127,7 @@ void ExternalLoader::reloadAndUpdate(bool throw_on_error)
|
||||
|
||||
try
|
||||
{
|
||||
auto loadable_ptr = failed_loadable_object.second.loadable->cloneObject();
|
||||
auto loadable_ptr = failed_loadable_object.second.loadable->clone();
|
||||
if (const auto exception_ptr = loadable_ptr->getCreationException())
|
||||
{
|
||||
/// recalculate next attempt time
|
||||
@ -211,7 +211,7 @@ void ExternalLoader::reloadAndUpdate(bool throw_on_error)
|
||||
if (current->isModified())
|
||||
{
|
||||
/// create new version of loadable object
|
||||
auto new_version = current->cloneObject();
|
||||
auto new_version = current->clone();
|
||||
|
||||
if (const auto exception_ptr = new_version->getCreationException())
|
||||
std::rethrow_exception(exception_ptr);
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
|
||||
virtual bool isModified() const = 0;
|
||||
|
||||
virtual std::unique_ptr<IExternalLoadable> cloneObject() const = 0;
|
||||
virtual std::unique_ptr<IExternalLoadable> clone() const = 0;
|
||||
|
||||
virtual std::exception_ptr getCreationException() const = 0;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user