27#ifndef I_HDF5RequestHandler_H
28#define I_HDF5RequestHandler_H
33#include "BESRequestHandler.h"
34#include "HDF5_DataMemCache.h"
35#include <BESDDSResponse.h>
36#include <BESDataDDSResponse.h>
69 static bool get_usecf() {
return _usecf;}
70 static bool get_pass_fileid() {
return _pass_fileid;}
71 static bool get_disable_structmeta() {
return _disable_structmeta;}
72 static bool get_disable_ecsmeta() {
return _disable_ecsmeta;}
73 static bool get_keep_var_leading_underscore() {
return _keep_var_leading_underscore;}
74 static bool get_check_name_clashing() {
return _check_name_clashing;}
75 static bool get_add_path_attrs() {
return _add_path_attrs;}
76 static bool get_drop_long_string() {
return _drop_long_string;}
77 static bool get_fillvalue_check() {
return _fillvalue_check;}
78 static bool get_check_ignore_obj() {
return _check_ignore_obj;}
79 static bool get_force_flatten_coor_attr() {
return _flatten_coor_attr;}
80 static bool get_eos5_rm_convention_attr_path() {
return _eos5_rm_convention_attr_path;}
81 static bool get_dmr_long_int() {
return _dmr_long_int;}
82 static bool get_no_zero_size_fullnameattr() {
return _no_zero_size_fullnameattr;}
83 static bool get_enable_coord_attr_add_path() {
return _enable_coord_attr_add_path;}
85 static bool get_usecfdmr() {
return _usecfdmr;}
88 static bool get_default_handle_dimension() {
return _default_handle_dimension;}
90 static void set_dmr_64bit_int(libdap::DMR *dmr) { dmr_int64 = dmr;}
91 static libdap::DMR* get_dmr_64bit_int() {
return dmr_int64;}
94 static string get_stp_east_filename() {
return _stp_east_filename;}
95 static string get_stp_north_filename() {
return _stp_north_filename;}
98 static unsigned int get_mdcache_entries() {
return _mdcache_entries;}
99 static unsigned int get_lrdcache_entries() {
return _lrdcache_entries;}
100 static unsigned int get_srdcache_entries() {
return _srdcache_entries;}
101 static float get_cache_purge_level() {
return _cache_purge_level;}
104 static ObjMemCache* get_lrdata_mem_cache() {
return lrdata_mem_cache;}
105 void set_lrdata_mem_cache(
ObjMemCache* my_lrdata_mem_cache)
106 {lrdata_mem_cache=my_lrdata_mem_cache;}
108 static ObjMemCache* get_srdata_mem_cache() {
return srdata_mem_cache;}
109 void set_srdata_mem_cache(
ObjMemCache* my_srdata_mem_cache)
110 {srdata_mem_cache=my_srdata_mem_cache;}
112 static bool get_common_cache_dirs() {
return _common_cache_dirs;}
113 static void get_lrd_cache_dir_list(std::vector<string>& cur_lrd_cache_dir_list)
114 { cur_lrd_cache_dir_list = lrd_cache_dir_list;}
116 static void get_lrd_non_cache_dir_list(std::vector<string>& cur_lrd_non_cache_dir_list)
117 { cur_lrd_non_cache_dir_list = lrd_non_cache_dir_list;}
119 static void get_lrd_var_cache_file_list(std::vector<string>& cur_lrd_var_cache_file_list)
120 { cur_lrd_var_cache_file_list = lrd_var_cache_file_list;}
124 static bool get_use_disk_cache() {
return _use_disk_cache;}
125 static string get_disk_cache_dir() {
return _disk_cache_dir;}
126 static string get_disk_cachefile_prefix() {
return _disk_cachefile_prefix;}
127 static unsigned long long get_disk_cache_size() {
return _disk_cache_size;}
128 static bool get_disk_cache_comp_data() {
return _disk_cache_comp_data;}
129 static bool get_disk_cache_float_only_comp(){
return _disk_cache_float_only_comp_data;}
130 static float get_disk_comp_threshold() {
return _disk_cache_comp_threshold;}
131 static unsigned long get_disk_var_size() {
return _disk_cache_var_size; }
133 static bool get_use_eosgeo_cachefile() {
return _use_latlon_disk_cache; }
134 static string get_latlon_disk_cache_dir() {
return _latlon_disk_cache_dir;}
135 static string get_latlon_disk_cachefile_prefix() {
return _latlon_disk_cachefile_prefix;}
136 static long get_latlon_disk_cache_size() {
return _latlon_disk_cache_size;}
145 void static load_config();
149 static unsigned int _mdcache_entries;
150 static unsigned int _lrdcache_entries;
151 static unsigned int _srdcache_entries;
152 static float _cache_purge_level;
163 static bool _pass_fileid;
164 static bool _disable_structmeta;
165 static bool _disable_ecsmeta;
166 static bool _keep_var_leading_underscore;
167 static bool _check_name_clashing;
168 static bool _add_path_attrs;
169 static bool _drop_long_string;
170 static bool _fillvalue_check;
171 static bool _check_ignore_obj;
172 static bool _flatten_coor_attr;
173 static bool _eos5_rm_convention_attr_path;
174 static bool _dmr_long_int;
175 static bool _no_zero_size_fullnameattr;
176 static bool _enable_coord_attr_add_path;
178 static bool _usecfdmr;
181 static bool _default_handle_dimension;
182 static std::string _stp_east_filename;
183 static std::string _stp_north_filename;
185 static libdap::DMR *dmr_int64;
186 static bool _use_disk_cache;
187 static std::string _disk_cache_dir;
188 static std::string _disk_cachefile_prefix;
189 static unsigned long long _disk_cache_size;
190 static bool _disk_cache_comp_data;
191 static bool _disk_cache_float_only_comp_data;
192 static float _disk_cache_comp_threshold;
193 static unsigned long _disk_cache_var_size;
196 static bool _use_disk_meta_cache;
197 static bool _use_disk_dds_cache;
198 static std::string _disk_meta_cache_path;
200 static bool _use_latlon_disk_cache;
201 static long _latlon_disk_cache_size;
202 static std::string _latlon_disk_cache_dir;
203 static std::string _latlon_disk_cachefile_prefix;
205 static bool _common_cache_dirs;
206 static std::vector<std::string> lrd_cache_dir_list;
207 static std::vector<string> lrd_non_cache_dir_list;
208 static std::vector<string> lrd_var_cache_file_list;
209 static bool obtain_lrd_common_cache_dirs();
214 static void get_dds_with_attributes(
BESDDSResponse*bdds,
BESDataDDSResponse*data_bdds,
const std::string &container_name,
const std::string &filename,
const std::string &dds_cache_fname,
const std::string &das_cache_fname,
bool dds_from_dc,
bool das_from_dc,
bool build_data);
215 static void get_dds_without_attributes_datadds(
BESDataDDSResponse*data_bdds,
const std::string &container_name,
const std::string &filename);
217 static void read_dds_from_disk_cache(
BESDDSResponse* bdds,
BESDataDDSResponse* data_bdds,
bool build_data,
const std::string & container_name,
const std::string & h5_fname,
218 const std::string & dds_cache_fname,
const std::string &das_cache_fname, hid_t h5_fd,
bool das_from_dc);
220 static void add_das_to_dds(libdap::DDS *dds,
const std::string &container_name,
const std::string &filename,
const std::string &das_cache_fname,hid_t h5_fd,
bool das_from_dc);
222 static bool write_dds_to_disk_cache(
const std::string& dds_cache_fname,libdap::DDS *dds_ptr);
224 static bool write_das_to_disk_cache(
const std::string & das_cache_fname, libdap::DAS *das_ptr);
226 static bool read_das_from_disk_cache(
const std::string & cache_filename,libdap::DAS *das_ptr);
Holds a DDS object within the BES.
Represents an OPeNDAP DataDDS DAP2 data object within the BES.
Structure storing information used by the BES to handle the request.
Represents a specific data type request handler.
An in-memory cache for DapObj (DAS, DDS, ...) objects.