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

@ -35,38 +35,53 @@
class ClearTableLockStatus
{
public:
/** @brief ClearTableLockStatus constructor
* @param moduleID PM module ID relevant to this status object
*/
explicit ClearTableLockStatus(int moduleID) :
fModuleID(moduleID), fReturnStatus(0) { }
/** @brief ClearTableLockStatus constructor
* @param moduleID PM module ID relevant to this status object
*/
explicit ClearTableLockStatus(int moduleID) :
fModuleID(moduleID), fReturnStatus(0) { }
/** @brief Accessor to return status
*/
int retStatus() const { return fReturnStatus; }
/** @brief Accessor to return status
*/
int retStatus() const
{
return fReturnStatus;
}
/** @brief Accessor to return message
*/
const std::string& retMsg() const { return fReturnMsg; }
/** @brief Accessor to return message
*/
const std::string& retMsg() const
{
return fReturnMsg;
}
/** @brief Accessor to PM module ID
*/
int moduleID() const { return fModuleID; }
/** @brief Accessor to PM module ID
*/
int moduleID() const
{
return fModuleID;
}
/** @brief Mutator used to set the return status
* @param stat Status to be saved
*/
void retStatus(int stat) { fReturnStatus = stat; }
/** @brief Mutator used to set the return status
* @param stat Status to be saved
*/
void retStatus(int stat)
{
fReturnStatus = stat;
}
/** @brief Mutator used to set the return message
* @param msg Status message to be saved
*/
void retMsg (const std::string& msg) { fReturnMsg = msg;}
/** @brief Mutator used to set the return message
* @param msg Status message to be saved
*/
void retMsg (const std::string& msg)
{
fReturnMsg = msg;
}
private:
int fModuleID; // PM module ID associated with this request
int fReturnStatus; // Return status from the PM
std::string fReturnMsg; // Return message from the PM
int fModuleID; // PM module ID associated with this request
int fReturnStatus; // Return status from the PM
std::string fReturnMsg; // Return message from the PM
};
//------------------------------------------------------------------------------
@ -75,47 +90,48 @@ private:
class ClearTableLockThread
{
public:
enum CLRTBLLOCK_MSGTYPE {
CLRTBLLOCK_MSGTYPE_ROLLBACK = 1,
CLRTBLLOCK_MSGTYPE_CLEANUP = 2
};
enum CLRTBLLOCK_MSGTYPE
{
CLRTBLLOCK_MSGTYPE_ROLLBACK = 1,
CLRTBLLOCK_MSGTYPE_CLEANUP = 2
};
/** @brief ClearTableLockThread constructor
* @param brm Handle to DBRM
* @param clt MessageQueueClient used to communicate with PM
* @param tInfo Initial table lock information
* @param tblName Name of table referenced by tInfo
* @param msgType Message to process
* @param pStatus Status object used to track this bulkload rollback req
*/
ClearTableLockThread(
BRM::DBRM* brm,
messageqcpp::MessageQueueClient* clt,
const BRM::TableLockInfo& tInfo,
const std::string& tblName,
CLRTBLLOCK_MSGTYPE msgType,
ClearTableLockStatus* pStatus);
/** @brief ClearTableLockThread constructor
* @param brm Handle to DBRM
* @param clt MessageQueueClient used to communicate with PM
* @param tInfo Initial table lock information
* @param tblName Name of table referenced by tInfo
* @param msgType Message to process
* @param pStatus Status object used to track this bulkload rollback req
*/
ClearTableLockThread(
BRM::DBRM* brm,
messageqcpp::MessageQueueClient* clt,
const BRM::TableLockInfo& tInfo,
const std::string& tblName,
CLRTBLLOCK_MSGTYPE msgType,
ClearTableLockStatus* pStatus);
/** @brief Entry point for thread execution
*/
void operator() ();
/** @brief Entry point for thread execution
*/
void operator() ();
private:
void executeRollback ( );
void executeFileCleanup( );
void setStatus(int status, const std::string& msg)
{
fStatus->retStatus( status );
fStatus->retMsg ( msg );
}
void executeRollback ( );
void executeFileCleanup( );
void setStatus(int status, const std::string& msg)
{
fStatus->retStatus( status );
fStatus->retMsg ( msg );
}
BRM::TableLockInfo fTableLockInfo; // Initial table lock information
BRM::DBRM* fBrm; // Handle to DBRM
messageqcpp::MessageQueueClient* fClt;// Msg queue client to send/rcv msgs
std::string fTblName; // Name of relevant table
CLRTBLLOCK_MSGTYPE fMsgType; // Msg type to process
ClearTableLockStatus* fStatus; // Status object used to track request
static boost::mutex fStdOutLock; // Synchronize logging to stdout
BRM::TableLockInfo fTableLockInfo; // Initial table lock information
BRM::DBRM* fBrm; // Handle to DBRM
messageqcpp::MessageQueueClient* fClt;// Msg queue client to send/rcv msgs
std::string fTblName; // Name of relevant table
CLRTBLLOCK_MSGTYPE fMsgType; // Msg type to process
ClearTableLockStatus* fStatus; // Status object used to track request
static boost::mutex fStdOutLock; // Synchronize logging to stdout
};
#endif