~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/definition/cache.cc

  • Committer: Brian Aker
  • Date: 2010-12-25 00:28:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2031.
  • Revision ID: brian@tangent.org-20101225002849-g73mg6ihulajis0o
First pass in refactoring of the name of my_decimal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include "drizzled/session.h"
28
28
#include "drizzled/identifier/table.h"
29
29
#include "drizzled/definition/cache.h"
30
 
 
31
 
#include "drizzled/table/instance.h"
 
30
#include "drizzled/definition/table.h"
32
31
 
33
32
namespace drizzled {
34
33
 
35
34
namespace definition {
36
35
 
37
 
table::instance::Shared::shared_ptr Cache::find(const identifier::Table::Key &key)
 
36
TableShare::shared_ptr Cache::find(const TableIdentifier::Key &key)
38
37
{
39
38
  boost::mutex::scoped_lock scopedLock(_mutex);
40
39
 
44
43
    return (*iter).second;
45
44
  }
46
45
 
47
 
  return table::instance::Shared::shared_ptr();
 
46
  return TableShare::shared_ptr();
48
47
}
49
48
 
50
 
void Cache::erase(const identifier::Table::Key &key)
 
49
void Cache::erase(const TableIdentifier::Key &key)
51
50
{
52
51
  boost::mutex::scoped_lock scopedLock(_mutex);
53
52
  
54
53
  cache.erase(key);
55
54
}
56
55
 
57
 
bool Cache::insert(const identifier::Table::Key &key, table::instance::Shared::shared_ptr share)
 
56
bool Cache::insert(const TableIdentifier::Key &key, TableShare::shared_ptr share)
58
57
{
59
58
  boost::mutex::scoped_lock scopedLock(_mutex);
60
59
  std::pair<Map::iterator, bool> ret=
63
62
  return ret.second;
64
63
}
65
64
 
66
 
void Cache::CopyFrom(drizzled::table::instance::Shared::vector &vector)
 
65
void Cache::CopyFrom(drizzled::TableShare::vector &vector)
67
66
{
68
67
  boost::mutex::scoped_lock scopedLock(_mutex);
69
68