1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2010 Brian Aker
5
* Copyright (C) 2010 Sun Microsystems
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
#ifndef DRIZZLED_TABLE_CACHE_H
23
#define DRIZZLED_TABLE_CACHE_H
25
#include <boost/unordered_map.hpp>
32
typedef boost::unordered_multimap< TableIdentifier::Key, Concurrent *> CacheMap;
33
typedef std::pair< CacheMap::const_iterator, CacheMap::const_iterator > CacheRange;
40
static inline Cache &singleton()
42
static Cache open_cache;
52
bool areTablesUsed(Table *table, bool wait_for_name_lock);
53
void removeSchema(const SchemaIdentifier &schema_identifier);
54
bool removeTable(Session *session, TableIdentifier &identifier, uint32_t flags);
55
void release(TableShare *share);
58
CacheMap &getCache(void);
59
void remove_table(table::Concurrent *arg);
61
} /* namepsace table */
62
} /* namepsace drizzled */
64
#endif /* DRIZZLED_TABLE_CACHE_H */