1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Reformat all code to coding standard

This commit is contained in:
Andrew Hutchings
2017-10-26 17:18:17 +01:00
parent 4985f3456e
commit 01446d1e22
1296 changed files with 403852 additions and 353747 deletions

View File

@ -34,32 +34,34 @@
#define EXPORT
#endif
namespace BRM {
namespace BRM
{
class TableLockServer {
class TableLockServer
{
public:
EXPORT TableLockServer(SessionManagerServer *);
virtual ~TableLockServer();
EXPORT TableLockServer(SessionManagerServer*);
virtual ~TableLockServer();
EXPORT uint64_t lock(TableLockInfo *);
EXPORT bool unlock(uint64_t id);
EXPORT bool changeState(uint64_t id, LockState state);
EXPORT bool changeOwner(uint64_t id, const std::string &ownerName, uint32_t pid, int32_t sessionID,
int32_t txnID);
EXPORT std::vector<TableLockInfo> getAllLocks() const;
EXPORT void releaseAllLocks();
EXPORT bool getLockInfo(uint64_t id, TableLockInfo *out) const;
EXPORT uint64_t lock(TableLockInfo*);
EXPORT bool unlock(uint64_t id);
EXPORT bool changeState(uint64_t id, LockState state);
EXPORT bool changeOwner(uint64_t id, const std::string& ownerName, uint32_t pid, int32_t sessionID,
int32_t txnID);
EXPORT std::vector<TableLockInfo> getAllLocks() const;
EXPORT void releaseAllLocks();
EXPORT bool getLockInfo(uint64_t id, TableLockInfo* out) const;
private:
void load();
void save();
void load();
void save();
mutable boost::mutex mutex;
std::map<uint64_t, TableLockInfo> locks;
typedef std::map<uint64_t, TableLockInfo>::iterator lit_t;
typedef std::map<uint64_t, TableLockInfo>::const_iterator constlit_t;
std::string filename;
SessionManagerServer *sms;
mutable boost::mutex mutex;
std::map<uint64_t, TableLockInfo> locks;
typedef std::map<uint64_t, TableLockInfo>::iterator lit_t;
typedef std::map<uint64_t, TableLockInfo>::const_iterator constlit_t;
std::string filename;
SessionManagerServer* sms;
};
}