bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
AggMemberDatasetDimensionCache.h
1/*
2 * AggMemberDatasetDimensionCache.h
3 *
4 * Created on: Sep 25, 2015
5 * Author: ndp
6 */
7
8#ifndef MODULES_NCML_MODULE_AGGMEMBERDATASETDIMENSIONCACHE_H_
9#define MODULES_NCML_MODULE_AGGMEMBERDATASETDIMENSIONCACHE_H_
10
11#include "BESFileLockingCache.h"
12
13namespace agg_util
14{
15// Forward declaration
17
32class AggMemberDatasetDimensionCache: public BESFileLockingCache
33{
34private:
35 static bool d_enabled;
36 static AggMemberDatasetDimensionCache * d_instance;
37 static void delete_instance();
38
39 std::string d_dimCacheDir;
40 std::string d_dataRootDir;
41 std::string d_dimCacheFilePrefix;
42 unsigned long d_maxCacheSize;
43
44 AggMemberDatasetDimensionCache();
45
46 bool is_valid(const std::string &cache_file_name, const std::string &dataset_file_name) const;
47
48
49 static std::string getBesDataRootDirFromConfig();
50 static std::string getCacheDirFromConfig();
51 static std::string getDimCachePrefixFromConfig();
52 static unsigned long getCacheSizeFromConfig();
53
54
55protected:
56
57 AggMemberDatasetDimensionCache(const std::string &data_root_dir, const std::string &stored_results_subdir, const std::string &prefix, unsigned long long size);
58
59public:
60 static const std::string CACHE_DIR_KEY;
61 static const std::string PREFIX_KEY;
62 static const std::string SIZE_KEY;
63
64 static AggMemberDatasetDimensionCache *get_instance(const std::string &bes_catalog_root_dir, const std::string &stored_results_subdir, const std::string &prefix, unsigned long long size);
65 static AggMemberDatasetDimensionCache *get_instance();
66
67 AggMemberDatasetDimensionCache(const AggMemberDatasetDimensionCache &src) = delete;
68
70
71 ~AggMemberDatasetDimensionCache() override = default;
72};
73
74} /* namespace agg_util */
75
76#endif /* MODULES_NCML_MODULE_AGGMEMBERDATASETDIMENSIONCACHE_H_ */
static AggMemberDatasetDimensionCache * get_instance()
Helper class for temporarily hijacking an existing dhi to load a DDX response for one particular file...