NCBI C++ ToolKit
cache_manager.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef CACHE_MANAGER__HPP_INCLUDED
2 #define CACHE_MANAGER__HPP_INCLUDED
3 /* $Id: cache_manager.hpp 63636 2014-07-16 15:38:41Z vasilche $
4 * ===========================================================================
5 * PUBLIC DOMAIN NOTICE
6 * National Center for Biotechnology Information
7 *
8 * This software/database is a "United States Government Work" under the
9 * terms of the United States Copyright Act. It was written as part of
10 * the author's official duties as a United States Government employee and
11 * thus cannot be copyrighted. This software/database is freely available
12 * to the public for use. The National Library of Medicine and the U.S.
13 * Government have not placed any restriction on its use or reproduction.
14 *
15 * Although all reasonable efforts have been taken to ensure the accuracy
16 * and reliability of the software and data, the NLM and the U.S.
17 * Government do not and cannot warrant the performance or results that
18 * may be obtained by using this software or data. The NLM and the U.S.
19 * Government disclaim all warranties, express or implied, including
20 * warranties of performance, merchantability or fitness for any particular
21 * purpose.
22 *
23 * Please cite the author in any work or product based on this material.
24 * ===========================================================================
25 *
26 * Author: Aleksey Grichenko
27 *
28 * File Description: Cache manager interface
29 *
30 */
31 
32 #include <corelib/ncbistd.hpp>
33 #include <util/cache/icache.hpp>
34 
37 
38 
40 {
41 public:
42  enum ECacheType {
43  fCache_Id = 1<<0,
44  fCache_Blob = 1<<1,
45  fCache_Any = fCache_Id | fCache_Blob
46  };
47  typedef int TCacheType;
49  {
50  SReaderCacheInfo(ICache& cache, ECacheType cache_type);
51  ~SReaderCacheInfo(void);
52 
55  };
56  typedef vector<SReaderCacheInfo> TCaches;
58 
59  CReaderCacheManager(void);
60  virtual ~CReaderCacheManager(void);
61 
62  virtual void RegisterCache(ICache& cache, ECacheType cache_type) = 0;
63  virtual TCaches& GetCaches(void) = 0;
64  virtual ICache* FindCache(ECacheType cache_type,
65  const TCacheParams* params) = 0;
66 
67 private:
68  // to prevent copying
71 };
72 
73 
76 
77 #endif // CACHE_MANAGER__HPP_INCLUDED
void operator=(const CReaderCacheManager &)
virtual ICache * FindCache(ECacheType cache_type, const TCacheParams *params)=0
vector< SReaderCacheInfo > TCaches
virtual void RegisterCache(ICache &cache, ECacheType cache_type)=0
CReaderCacheManager(const CReaderCacheManager &)
TPluginManagerParamTree TCacheParams
virtual TCaches & GetCaches(void)=0
definition of a Culling tree
Definition: ncbi_tree.hpp:100
BLOB cache read/write/maintenance interface.
Definition: icache.hpp:64
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
#define NCBI_XREADER_EXPORT
Definition: ncbi_export.h:1371
Interfaces for a local cache of versioned binary large objects (BLOBS).
Modified on Sun Apr 14 05:27:49 2024 by modify_doxy.py rev. 669887