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

clang format apply

This commit is contained in:
Leonid Fedorov
2022-02-11 12:24:40 +00:00
parent 509f005be7
commit 7c808317dc
1367 changed files with 394342 additions and 413129 deletions

View File

@@ -24,17 +24,15 @@
*
* jrodriguez@calpont.com *
* *
***************************************************************************/
***************************************************************************/
#include <deque>
#include <pthread.h>
#include <iostream>
#include "filerequest.h"
/**
@author Jason Rodriguez <jrodriguez@calpont.com>
@author Jason Rodriguez <jrodriguez@calpont.com>
*/
/**
@@ -42,75 +40,71 @@
**/
namespace dbbc
{
typedef std::deque<fileRequest*> fileBlockRequestQueue_t;
/**
* @brief class to hold requests for disk blocks in a queue. sorted by the size of a request
**/
class fileBlockRequestQueue
{
public:
/**
* @brief default ctor
**/
fileBlockRequestQueue();
public:
/**
* @brief dtor
**/
virtual ~fileBlockRequestQueue();
/**
* @brief default ctor
**/
fileBlockRequestQueue();
/**
* @brief add a request to the queue
**/
int push(fileRequest& blk);
/**
* @brief dtor
**/
virtual ~fileBlockRequestQueue();
/**
* @brief get the next request from the queue and delete it from the queue
**/
fileRequest* pop(void);
/**
* @brief add a request to the queue
**/
int push(fileRequest& blk);
/**
* @brief true if no reuquests are in the queue. false if there are requests in the queue
**/
bool empty() const;
/**
* @brief get the next request from the queue and delete it from the queue
**/
fileRequest* pop(void);
/**
* @brief number of requests in the queue
**/
uint32_t size() const
{
return queueSize;
}
/**
* @brief true if no reuquests are in the queue. false if there are requests in the queue
**/
bool empty() const;
/**
* @brief queue will stop accecpting requests in preparation for the dtor
**/
void stop();
/**
* @brief number of requests in the queue
**/
uint32_t size() const
{
return queueSize;
}
/**
* @brief queue will stop accecpting requests in preparation for the dtor
**/
void stop();
protected:
pthread_mutex_t mutex;
pthread_cond_t notEmpty;
fileBlockRequestQueue_t fbQueue;
uint32_t queueSize;
uint32_t readersWaiting;
private:
// do not implement
fileBlockRequestQueue(const fileBlockRequestQueue& Q) {}
const fileBlockRequestQueue& operator=(const fileBlockRequestQueue& Q);
/**
* @brief pointer to the next request to be popped from the queue
**/
fileRequest* top() const;
protected:
pthread_mutex_t mutex;
pthread_cond_t notEmpty;
fileBlockRequestQueue_t fbQueue;
uint32_t queueSize;
uint32_t readersWaiting;
private:
// do not implement
fileBlockRequestQueue(const fileBlockRequestQueue& Q)
{
}
const fileBlockRequestQueue& operator=(const fileBlockRequestQueue& Q);
/**
* @brief pointer to the next request to be popped from the queue
**/
fileRequest* top() const;
};
}
} // namespace dbbc
#endif