18
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
#ifndef DRIZZLED_DEFINITION_CACHE_H
22
#define DRIZZLED_DEFINITION_CACHE_H
24
#include "drizzled/table/instance.h"
23
#include <drizzled/table/instance.h>
26
25
namespace drizzled {
29
class TableDefinitionCache;
32
26
namespace definition {
37
static inline Cache &singleton()
39
static Cache open_cache;
46
34
return cache.size();
49
void rehash(size_t arg)
37
static void rehash(size_t arg)
54
table::instance::Shared::shared_ptr find(const identifier::Table::Key &identifier);
55
void erase(const identifier::Table::Key &identifier);
56
bool insert(const identifier::Table::Key &identifier, table::instance::Shared::shared_ptr share);
59
friend class drizzled::generator::TableDefinitionCache;
61
void CopyFrom(table::instance::Shared::vector &vector);
43
static table::instance::Shared::shared_ptr find(const identifier::Table::Key&);
44
static void erase(const identifier::Table::Key&);
45
static bool insert(const identifier::Table::Key&, table::instance::Shared::shared_ptr);
47
static void CopyFrom(table::instance::Shared::vector&);
64
49
typedef boost::unordered_map< identifier::Table::Key, table::instance::Shared::shared_ptr> Map;
52
static boost::mutex _mutex;
54
friend class generator::TableDefinitionCache;
70
57
} /* namespace definition */
71
58
} /* namespace drizzled */
73
#endif /* DRIZZLED_DEFINITION_CACHE_H */