~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session/cache.cc

merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#include <vector>
23
23
 
24
 
#include "drizzled/session/cache.h"
25
 
#include "drizzled/session.h"
26
 
#include "drizzled/current_session.h"
27
 
#include "drizzled/plugin/authorization.h"
 
24
#include <drizzled/session.h>
 
25
#include <drizzled/session/cache.h>
 
26
#include <drizzled/current_session.h>
 
27
#include <drizzled/plugin/authorization.h>
28
28
 
29
29
#include <boost/foreach.hpp>
30
30
 
34
34
namespace session
35
35
{
36
36
 
37
 
Session::shared_ptr Cache::find(const session_id_t &id)
 
37
Cache::session_shared_ptr Cache::find(const session_id_t &id)
38
38
{
39
39
  boost::mutex::scoped_lock scopedLock(_mutex);
40
40
 
46
46
    }
47
47
  }
48
48
 
49
 
  return Session::shared_ptr();
 
49
  return session_shared_ptr();
50
50
}
51
51
 
52
52
void Cache::shutdownFirst()
76
76
  return cache.size();
77
77
}
78
78
 
79
 
void Cache::insert(Session::shared_ptr &arg)
 
79
void Cache::insert(session_shared_ptr &arg)
80
80
{
81
81
  boost::mutex::scoped_lock scopedLock(_mutex);
82
82
  cache.push_back(arg);
83
83
}
84
84
 
85
 
void Cache::erase(Session::shared_ptr &arg)
 
85
void Cache::erase(session_shared_ptr &arg)
86
86
{
87
87
  list::iterator iter= std::find(cache.begin(), cache.end(), arg);
88
88
  assert(iter != cache.end());