mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
43 lines
1.4 KiB
C++
43 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <Access/MemoryAccessStorage.h>
|
|
|
|
|
|
namespace Poco
|
|
{
|
|
namespace Util
|
|
{
|
|
class AbstractConfiguration;
|
|
}
|
|
}
|
|
|
|
|
|
namespace DB
|
|
{
|
|
/// Implementation of IAccessStorage which loads all from users.xml periodically.
|
|
class UsersConfigAccessStorage : public IAccessStorage
|
|
{
|
|
public:
|
|
UsersConfigAccessStorage();
|
|
|
|
void setConfiguration(const Poco::Util::AbstractConfiguration & config);
|
|
|
|
private:
|
|
std::optional<UUID> findImpl(std::type_index type, const String & name) const override;
|
|
std::vector<UUID> findAllImpl(std::type_index type) const override;
|
|
bool existsImpl(const UUID & id) const override;
|
|
AccessEntityPtr readImpl(const UUID & id) const override;
|
|
String readNameImpl(const UUID & id) const override;
|
|
bool canInsertImpl(const AccessEntityPtr &) const override { return false; }
|
|
UUID insertImpl(const AccessEntityPtr & entity, bool replace_if_exists) override;
|
|
void removeImpl(const UUID & id) override;
|
|
void updateImpl(const UUID & id, const UpdateFunc & update_func) override;
|
|
ext::scope_guard subscribeForChangesImpl(const UUID & id, const OnChangedHandler & handler) const override;
|
|
ext::scope_guard subscribeForChangesImpl(std::type_index type, const OnChangedHandler & handler) const override;
|
|
bool hasSubscriptionImpl(const UUID & id) const override;
|
|
bool hasSubscriptionImpl(std::type_index type) const override;
|
|
|
|
MemoryAccessStorage memory_storage;
|
|
};
|
|
}
|