You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-27 21:01:50 +03:00
Reformat all code to coding standard
This commit is contained in:
@ -36,34 +36,42 @@
|
||||
#define EXPORT
|
||||
#endif
|
||||
|
||||
namespace BRM {
|
||||
namespace BRM
|
||||
{
|
||||
|
||||
class AutoincrementManager {
|
||||
class AutoincrementManager
|
||||
{
|
||||
public:
|
||||
EXPORT AutoincrementManager();
|
||||
EXPORT virtual ~AutoincrementManager();
|
||||
EXPORT AutoincrementManager();
|
||||
EXPORT virtual ~AutoincrementManager();
|
||||
|
||||
EXPORT void startSequence(uint32_t OID, uint64_t firstNum, uint32_t colWidth,
|
||||
EXPORT void startSequence(uint32_t OID, uint64_t firstNum, uint32_t colWidth,
|
||||
execplan::CalpontSystemCatalog::ColDataType colDataType);
|
||||
EXPORT bool getAIRange(uint32_t OID, uint64_t count, uint64_t *firstNum);
|
||||
EXPORT void resetSequence(uint32_t OID, uint64_t value);
|
||||
EXPORT void getLock(uint32_t OID);
|
||||
EXPORT void releaseLock(uint32_t OID);
|
||||
EXPORT void deleteSequence(uint32_t OID);
|
||||
EXPORT bool getAIRange(uint32_t OID, uint64_t count, uint64_t* firstNum);
|
||||
EXPORT void resetSequence(uint32_t OID, uint64_t value);
|
||||
EXPORT void getLock(uint32_t OID);
|
||||
EXPORT void releaseLock(uint32_t OID);
|
||||
EXPORT void deleteSequence(uint32_t OID);
|
||||
|
||||
private:
|
||||
static const uint32_t lockTime = 30; // 30 seconds
|
||||
struct sequence {
|
||||
sequence() : value(0), overflow(0) { }
|
||||
sequence(const sequence &s) : value(s.value), overflow(s.overflow) { }
|
||||
sequence & operator=(const sequence &s) { value = s.value; overflow = s.overflow; return *this; }
|
||||
uint64_t value;
|
||||
uint64_t overflow;
|
||||
boost::mutex lock;
|
||||
};
|
||||
static const uint32_t lockTime = 30; // 30 seconds
|
||||
struct sequence
|
||||
{
|
||||
sequence() : value(0), overflow(0) { }
|
||||
sequence(const sequence& s) : value(s.value), overflow(s.overflow) { }
|
||||
sequence& operator=(const sequence& s)
|
||||
{
|
||||
value = s.value;
|
||||
overflow = s.overflow;
|
||||
return *this;
|
||||
}
|
||||
uint64_t value;
|
||||
uint64_t overflow;
|
||||
boost::mutex lock;
|
||||
};
|
||||
|
||||
boost::mutex lock;
|
||||
std::map<uint64_t, sequence> sequences;
|
||||
boost::mutex lock;
|
||||
std::map<uint64_t, sequence> sequences;
|
||||
};
|
||||
|
||||
} /* namespace BRM */
|
||||
|
Reference in New Issue
Block a user