[7172b2]: src / plugins / MHiveStorage / services / engines / redundant_engine / RedundantEngine.h Maximize Restore History

Download this file

RedundantEngine.h    44 lines (33 with data), 1.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef REDUNTANTENGINE_H
#define REDUNTANTENGINE_H
#include "../Engine.h"
#include "../Simple.h"
#include "org/esb/hive/job/ProcessUnit.h"
#include "org/esb/db/hivedb.hpp"
#include "DLMBoostMutex.h"
#include "boost/bind.hpp"
#include "mongo/client/dbclient.h"
#include "Poco/Net/HTTPClientSession.h"
using Poco::Net::HTTPClientSession;
namespace mhivestorage{
namespace engines {
class RedundantEngine : public Simple
{
public:
RedundantEngine( db::HiveDb database, std::string storage_path, std::vector<std::string> hosts, int self_port);
void put(boost::shared_ptr<org::esb::hive::job::ProcessUnit>unit);
boost::shared_ptr<org::esb::hive::job::ProcessUnit> get();
void enque(boost::shared_ptr<org::esb::hive::job::ProcessUnit>unit);
boost::shared_ptr<org::esb::hive::job::ProcessUnit> deque();
void commit(std::string uuid);
void rollback(std::string uuid);
private:
//db::HiveDb database;
std::string _storage_path;
DLMBoostMutex _mutex;
//std::list<Ptr<HTTPClientSession> > _clients;
//Ptr<mongo::DBClientConnection> c;
};
}
}
#endif // REDUNTANTENGINE_H