bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
JoinExistingDimensionCacheManager.h
1
2// This file is part of the "NcML Module" project, a BES module designed
3// to allow NcML files to be used to be used as a wrapper to add
4// AIS to existing datasets of any format.
5//
6// Copyright (c) 2011 OPeNDAP, Inc.
7// Author: Michael Johnson <m.johnson@opendap.org>
8//
9// For more information, please also see the main website: http://opendap.org/
10//
11// This library is free software; you can redistribute it and/or
12// modify it under the terms of the GNU Lesser General Public
13// License as published by the Free Software Foundation; either
14// version 2.1 of the License, or (at your option) any later version.
15//
16// This library is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19// Lesser General Public License for more details.
20//
21// You should have received a copy of the GNU Lesser General Public
22// License along with this library; if not, write to the Free Software
23// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24//
25// Please see the files COPYING and COPYRIGHT for more information on the GLPL.
26//
27// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
29
30#if 0 // THis is in progress, so commented out to avoid compilation bugs.
31#ifndef __NCML_MODULE__JOIN_EXISTING_DIMENSION_CACHE_MANAGER_H__
32#define __NCML_MODULE__JOIN_EXISTING_DIMENSION_CACHE_MANAGER_H__
33
34#include <memory>
35#include <string>
36
37namespace agg_util
38{
39 class AggMemberDataset;
40};
41
42namespace ncml_module
43{
44 class JoinExistingDimensionCacheManager
45 {
46 public:
47
52 JoinExistingDimensionCacheManager(const std::string& cacheDir);
53 ~JoinExistingDimensionCacheManager();
54
58 static std::unique_ptr<JoinExistingDimensionCache> makeCacheInstance(const std::string& sourceFile);
59
60 }; // class JoinExistingDimensionCacheManager
61
62 class JoinExistingDimensionCache
63 {
64 friend class JoinExistingDimensionCacheManager;
65
66 private:
67 // only the manager can make them
68 JoinExistingDimensionCache(const std::string sourcePath, const std::string& cacheDir);
69
70 public:
71 ~JoinExistingDimensionCache();
72
76 bool doesCacheFileExist() const;
77
82 bool isCacheFileFresh() const;
83
85 private:// data rep
86
87 std::string _sourceFilename;// source to be cached, set in ctor
88 std::string _cacheFilename;// cache file associated with _sourceFilename
89 std::string _tempCacheFilename;// temp name for cache file for writing it before copy
90
91 // @var Mod time for the source file
92 // @var Mod time for the cache file
93
94 // Locks?
95
96 }; // class JoinExistingDimensionCache
97
98}
99
100#endif /* __NCML_MODULE__JOIN_EXISTING_DIMENSION_CACHE_MANAGER_H__ */
101#endif // 0
Helper class for temporarily hijacking an existing dhi to load a DDX response for one particular file...
NcML Parser for adding/modifying/removing metadata (attributes) to existing local datasets using NcML...