OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
BESCache3.h
Go to the documentation of this file.
1 // BESCache3.h
2 
3 // This file is part of bes, A C++ back-end server implementation framework
4 // for the OPeNDAP Data Access Protocol.
5 
6 // Copyright (c) 2014 OPeNDAP, Inc
7 // Author: James Gallagher <jgallagher@opendap.org>,
8 // Patrick West <pwest@ucar.edu> and Jose Garcia <jgarcia@ucar.edu>
9 //
10 // This library is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU Lesser General Public
12 // License as published by the Free Software Foundation; either
13 // version 2.1 of the License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 //
24 // You can contact University Corporation for Atmospheric Research at
25 // 3080 Center Green Drive, Boulder, CO 80301
26 
27 #ifndef BESCache3_h_
28 #define BESCache3_h_ 1
29 
30 #include <string>
31 
32 #include "BESFileLockingCache.h"
33 #include "BESDebug.h"
34 
35 class BESKeys;
36 
61 
62 private:
63  static BESCache3 * d_instance;
64 
65 protected:
67  BESCache3(const string &cache_dir, const string &prefix, unsigned long size) :
68  BESFileLockingCache(cache_dir, prefix, size) {}
69  BESCache3(BESKeys *keys, const string &cache_dir_key, const string &prefix_key, const string &size_key);
70 
71 public:
72  virtual ~BESCache3() { }
73 
74  static BESCache3 *get_instance(BESKeys *keys, const string &cache_dir_key, const string &prefix_key, const string &size_key);
75  static BESCache3 *get_instance(const string &cache_dir, const string &prefix, unsigned long size); // Testing
76  static BESCache3 *get_instance();
77 
78  virtual void dump(ostream &strm) const ;
79 };
80 
81 #endif // BESCache3_h_
virtual void dump(ostream &strm) const
dumps information about this object
Definition: BESCache3.cc:139
virtual ~BESCache3()
Definition: BESCache3.h:72
BESCache3()
Definition: BESCache3.h:66
BESCache3(const string &cache_dir, const string &prefix, unsigned long size)
Definition: BESCache3.h:67
Implementation of a caching mechanism for compressed data.
mapping of key/value pairs defining different behaviors of an application.
Definition: BESKeys.h:84
Implementation of a caching mechanism for compressed data.
Definition: BESCache3.h:60
static BESCache3 * get_instance()
Get an instance of the BESCache3 object.
Definition: BESCache3.cc:83