You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-12-17 01:02:23 +03:00
Check pointing some changes I made all over the place
working on Synchronizer. Won't build yet.
This commit is contained in:
@@ -3,8 +3,16 @@
|
||||
#define SYNCHRONIZER_H_
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <deque>
|
||||
#include <boost/utility.hpp>
|
||||
|
||||
#include "SMLogging.h"
|
||||
#include "Cache.h"
|
||||
#include "Replicator.h"
|
||||
#include "IOCoordinator.h"
|
||||
#include "ThreadPool.h"
|
||||
|
||||
namespace storagemanager
|
||||
{
|
||||
|
||||
@@ -14,10 +22,41 @@ class Synchronizer : public boost::noncopyable
|
||||
static Synchronizer *get();
|
||||
virtual ~Synchronizer();
|
||||
|
||||
void newJournalEntry(const std::string &key);
|
||||
void newObjects(const std::vector<std::string> &keys);
|
||||
void deletedObjects(const std::vector<std::string> &keys);
|
||||
void flushObject(const std::string &key);
|
||||
|
||||
|
||||
private:
|
||||
Synchronizer();
|
||||
|
||||
struct FlushListener
|
||||
{
|
||||
FlushListener(boost::mutex *m, boost::condvar *c);
|
||||
boost::mutex *mutex;
|
||||
boost::condition *condvar;
|
||||
void flushed();
|
||||
}
|
||||
|
||||
struct PendingOps
|
||||
{
|
||||
PendingOps(int flags, std::list<std::string>::iterator pos);
|
||||
int opFlags;
|
||||
bool finished;
|
||||
std::list<std::string>::iterator queueEntry;
|
||||
boost::condition condvar;
|
||||
void wait();
|
||||
void notify();
|
||||
};
|
||||
|
||||
ThreadPool threadPool;
|
||||
std::map<std::string, boost::shared_ptr<PendingOps> > pendingOps;
|
||||
std::list<std::string> workQueue;
|
||||
SMLogging *logger;
|
||||
Cache *cache;
|
||||
Replicator *replicator;
|
||||
IOCoordinator *ioc;
|
||||
boost::mutex mutex;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user