25 #ifndef _bes_store_result_cache_h 26 #define _bes_store_result_cache_h 30 #include <DapXmlNamespaces.h> 33 #include "BESFileLockingCache.h" 35 #undef DAP2_STORED_RESULTS 45 class ConstraintEvaluator;
46 class BaseTypeFactory;
58 static void delete_instance()
64 string d_storedResultsSubdir;
66 string d_resultFilePrefix;
67 unsigned long d_maxCacheSize;
74 bool is_valid(
const std::string &cache_file_name,
const std::string &dataset);
75 #ifdef DAP2_STORED_RESULTS 76 bool read_dap2_data_from_cache(
const string &cache_file_name, libdap::DDS *fdds);
78 bool read_dap4_data_from_cache(
const string &cache_file_name, libdap::DMR *dmr);
80 friend class StoredDap2ResultTest;
81 friend class StoredDap4ResultTest;
82 friend class ResponseBuilderTest;
84 string get_stored_result_local_id(
const string &dataset,
const string &ce, libdap::DAPVersion version);
86 string getBesDataRootDirFromConfig();
87 string getSubDirFromConfig();
88 string getResultPrefixFromConfig();
89 unsigned long getCacheSizeFromConfig();
94 unsigned long long size);
97 static const string SUBDIR_KEY;
98 static const string PREFIX_KEY;
99 static const string SIZE_KEY;
104 const string &stored_results_subdir,
const string &prefix,
unsigned long long size);
107 #ifdef DAP2_STORED_RESULTS 108 libdap::DDS *get_cached_dap2_data_ddx(
const std::string &cache_file_name, libdap::BaseTypeFactory *factory,
const std::string &dataset);
110 virtual string store_dap2_result(libdap::DDS &dds,
const std::string &constraint,
BESDapResponseBuilder *rb,
111 libdap::ConstraintEvaluator *eval);
114 libdap::DMR *
get_cached_dap4_data(
const string &cache_file_name, libdap::D4BaseTypeFactory *factory,
115 const string &filename);
121 #endif // _bes_store_result_cache_h virtual string store_dap4_result(libdap::DMR &dmr, const string &constraint, BESDapResponseBuilder *rb)
libdap::DMR * get_cached_dap4_data(const string &cache_file_name, libdap::D4BaseTypeFactory *factory, const string &filename)
Implementation of a caching mechanism for compressed data. This cache uses simple advisory locking fo...
static BESStoredDapResultCache * get_instance()