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
23
#include <drizzled/table/instance.h>
24
#include "drizzled/table/instance.h"
25
26
namespace drizzled {
29
class TableDefinitionCache;
26
32
namespace definition {
37
static inline Cache &singleton()
39
static Cache open_cache;
34
46
return cache.size();
37
static void rehash(size_t arg)
49
void rehash(size_t arg)
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);
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);
47
static void CopyFrom(table::instance::Shared::vector&);
49
64
typedef boost::unordered_map< identifier::Table::Key, table::instance::Shared::shared_ptr> Map;
52
static boost::mutex _mutex;
54
friend class generator::TableDefinitionCache;
57
70
} /* namespace definition */
58
71
} /* namespace drizzled */
73
#endif /* DRIZZLED_DEFINITION_CACHE_H */