Fledge
An open source edge computing platform for industrial users
purge_configuration.h
1 #ifndef _PURGE_CONFIGURATION_H
2 #define _PURGE_CONFIGURATION_H
3 /*
4  * Fledge storage service - Purge configuration
5  *
6  * Copyright (c) 2021 Dianomic Systems
7  *
8  * Released under the Apache 2.0 Licence
9  *
10  * Author: Mark Riddoch
11  */
12 #include <string>
13 #include <vector>
14 
16  public:
18  void exclude(const std::string& asset);
19  bool hasExclusions() { return m_exclude.size() != 0; };
20  bool isExcluded(const std::string& asset);
21  void minimumRetained(uint32_t minimum);
22  uint32_t getMinimumRetained() { return m_minimum; };
23  private:
26  private:
27  static PurgeConfiguration *m_instance;
28  std::vector<std::string> m_exclude;
29  uint32_t m_minimum;
30 };
31 
32 #endif
void exclude(const std::string &asset)
Add an asset to the exclusion list.
Definition: purge_configuration.cpp:52
void minimumRetained(uint32_t minimum)
Set the minimum number of rows to retian for each asset.
Definition: purge_configuration.cpp:81
Definition: purge_configuration.h:15
bool isExcluded(const std::string &asset)
Check if the named asset appears in the exclusion list.
Definition: purge_configuration.cpp:64
static PurgeConfiguration * getInstance()
Return the singleton instance of the PurgeConfiguration class for this plugin.
Definition: purge_configuration.cpp:38