1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +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

@@ -14,77 +14,83 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
/*******************************************************************************
* $Id$
*
*******************************************************************************/
/*
* we_cpifeederthread.h
*
* Created on: Mar 29, 2012
* Author: bpaul
*/
#ifndef WE_CPIFEEDERTHREAD_H_
#define WE_CPIFEEDERTHREAD_H_
#include <queue>
namespace WriteEngine
{
class WEDataLoader;
class WECpiFeederThread;
class WECpiFeederRunner
{
public:
WECpiFeederRunner(WECpiFeederThread& Ref): fOwner(Ref){ /* ctor */ }
virtual ~WECpiFeederRunner(){/* dtor */}
void operator()();
public:
WECpiFeederThread& fOwner;
};
class WECpiFeederThread
{
public:
WECpiFeederThread(WEDataLoader& Ref);
virtual ~WECpiFeederThread();
public:
void startFeederThread();
void add2MsgQueue(messageqcpp::ByteStream& Ibs);
void feedData2Cpi();
void stopThread();
bool isMsgQueueEmpty();
//bool isPushing() { return fPushing; }
bool isStopped() { return fStopped; }
int getQueueSize() { return fMsgQueue.size(); }
bool isContinue();
private:
WEDataLoader& fOwner;
boost::condition fFeederCond;
boost::mutex fMsgQMutex;
typedef std::queue<messageqcpp::SBS> WEMsgQueue;
WEMsgQueue fMsgQueue;
boost::thread *fpThread;
bool fContinue;
boost::mutex fContMutex;
//bool fPushing;
bool fStopped;
friend class WEDataLoader;
};
} /* namespace WriteEngine */
#endif /* WE_CPIFEEDERTHREAD_H_ */
/*******************************************************************************
* $Id$
*
*******************************************************************************/
/*
* we_cpifeederthread.h
*
* Created on: Mar 29, 2012
* Author: bpaul
*/
#ifndef WE_CPIFEEDERTHREAD_H_
#define WE_CPIFEEDERTHREAD_H_
#include <queue>
namespace WriteEngine
{
class WEDataLoader;
class WECpiFeederThread;
class WECpiFeederRunner
{
public:
WECpiFeederRunner(WECpiFeederThread& Ref): fOwner(Ref) { /* ctor */ }
virtual ~WECpiFeederRunner() {/* dtor */}
void operator()();
public:
WECpiFeederThread& fOwner;
};
class WECpiFeederThread
{
public:
WECpiFeederThread(WEDataLoader& Ref);
virtual ~WECpiFeederThread();
public:
void startFeederThread();
void add2MsgQueue(messageqcpp::ByteStream& Ibs);
void feedData2Cpi();
void stopThread();
bool isMsgQueueEmpty();
//bool isPushing() { return fPushing; }
bool isStopped()
{
return fStopped;
}
int getQueueSize()
{
return fMsgQueue.size();
}
bool isContinue();
private:
WEDataLoader& fOwner;
boost::condition fFeederCond;
boost::mutex fMsgQMutex;
typedef std::queue<messageqcpp::SBS> WEMsgQueue;
WEMsgQueue fMsgQueue;
boost::thread* fpThread;
bool fContinue;
boost::mutex fContMutex;
//bool fPushing;
bool fStopped;
friend class WEDataLoader;
};
} /* namespace WriteEngine */
#endif /* WE_CPIFEEDERTHREAD_H_ */