~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/user_locks/locks.h

  • Committer: Brian Aker
  • Date: 2010-10-12 21:41:44 UTC
  • mto: This revision was merged to the branch mainline in revision 1853.
  • Revision ID: brian@tangent.org-20101012214144-itr2sww5i9uks044
Added a table function to see locks, updated some tests to see the
additional tables.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
namespace user_locks {
35
35
 
 
36
const size_t LARGEST_LOCK_NAME= 64;
 
37
 
36
38
class Locks
37
39
{
 
40
public:
38
41
  struct lock_st {
39
42
    drizzled::session_id_t id;
40
43
 
48
51
 
49
52
  typedef boost::unordered_map<std::string, lock_st_ptr, drizzled::util::insensitive_hash, drizzled::util::insensitive_equal_to> LockMap;
50
53
 
51
 
public:
52
54
  static Locks &getInstance(void)
53
55
  {
54
56
    static Locks instance;
61
63
  boost::tribool release(const std::string &arg, drizzled::session_id_t &id_arg);
62
64
  bool isFree(const std::string &arg);
63
65
  bool isUsed(const std::string &arg, drizzled::session_id_t &id_arg);
 
66
  void Copy(LockMap &lock_map);
64
67
 
65
68
private:
66
69
  boost::mutex mutex;