~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session/cache.h

  • Committer: Brian Aker
  • Date: 2010-12-01 21:54:28 UTC
  • mto: This revision was merged to the branch mainline in revision 1968.
  • Revision ID: brian@tangent.org-20101201215428-wzfiji3cj386lrmp
Merge in change to push session list in to its own directory above first
level.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_SESSION_LIST_H
21
 
#define DRIZZLED_SESSION_LIST_H
 
20
#ifndef DRIZZLED_SESSION_CACHE_H
 
21
#define DRIZZLED_SESSION_CACHE_H
22
22
 
23
23
#include "drizzled/session.h"
24
24
#include <list>
34
34
class Cache 
35
35
{
36
36
public:
37
 
  typedef std::list<Session::shared_ptr> List;
 
37
  typedef std::list<Session::shared_ptr> list;
38
38
 
39
39
  static inline Cache &singleton()
40
40
  {
43
43
    return open_cache;
44
44
  }
45
45
 
46
 
  List &getCache()
 
46
  list &getCache()
47
47
  {
48
48
    return cache;
49
49
  }
61
61
  Session::shared_ptr find(const session_id_t &id);
62
62
 
63
63
private:
64
 
  List cache;
 
64
  list cache;
65
65
  boost::mutex _mutex;
66
66
};
67
67
 
68
68
} /* namespace session */
69
69
} /* namespace drizzled */
70
70
 
71
 
#endif /* DRIZZLED_SESSION_LIST_H */
 
71
#endif /* DRIZZLED_SESSION_CACHE_H */