1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

clang format apply

This commit is contained in:
Leonid Fedorov
2022-01-21 16:43:49 +00:00
parent 6b6411229f
commit 04752ec546
1376 changed files with 393460 additions and 412662 deletions

View File

@ -16,10 +16,10 @@
MA 02110-1301, USA. */
/***********************************************************************
* $Id: dmlresultbuffer.h 927 2013-01-21 14:11:25Z rdempsey $
*
*
***********************************************************************/
* $Id: dmlresultbuffer.h 927 2013-01-21 14:11:25Z rdempsey $
*
*
***********************************************************************/
/** @file */
#pragma once
@ -31,64 +31,63 @@
namespace dmlprocessor
{
/** @brief holds dml results
*/
*/
class DMLResultBuffer
{
public:
typedef boost::mutex::scoped_lock scoped_lock;
public:
typedef boost::mutex::scoped_lock scoped_lock;
/** @brief the type of a <DMLResult, sessionID> pair
*
*/
struct ResultPair
{
dmlpackageprocessor::DMLPackageProcessor::DMLResult result;
int sessionID;
};
/** @brief the type of a <DMLResult, sessionID> pair
*
*/
struct ResultPair
{
dmlpackageprocessor::DMLPackageProcessor::DMLResult result;
int sessionID;
};
/** @brief ctor
*/
DMLResultBuffer();
/** @brief ctor
*/
DMLResultBuffer();
/** @brief ctor
*
*/
DMLResultBuffer(int bufferSize);
/** @brief ctor
*
*/
DMLResultBuffer(int bufferSize);
/** @brief dtor
*
*/
~DMLResultBuffer();
/** @brief dtor
*
*/
~DMLResultBuffer();
/** @brief set the size of the buffer
*
* @param bufferSize the size of the buffer
*/
inline void setBufferSize(int bufferSize)
{
fBufferSize = bufferSize;
}
/** @brief set the size of the buffer
*
* @param bufferSize the size of the buffer
*/
inline void setBufferSize(int bufferSize)
{
fBufferSize = bufferSize;
}
/** @brief put results in the buffer
*
*/
void put( dmlpackageprocessor::DMLPackageProcessor::DMLResult result, int sessionID );
/** @brief put results in the buffer
*
*/
void put(dmlpackageprocessor::DMLPackageProcessor::DMLResult result, int sessionID);
/** @brief get results from the buffer
*
*/
ResultPair get();
/** @brief get results from the buffer
*
*/
ResultPair get();
private:
boost::mutex fMutex;
boost::condition fCond;
private:
boost::mutex fMutex;
boost::condition fCond;
typedef std::deque<ResultPair> ResultBuffer;
ResultBuffer fResultBuffer;
typedef std::deque<ResultPair> ResultBuffer;
ResultBuffer fResultBuffer;
int fBufferSize;
int fFull;
int fBufferSize;
int fFull;
};
} //namespace dmlprocessor
} // namespace dmlprocessor