-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConfigMgr.h
47 lines (35 loc) · 930 Bytes
/
ConfigMgr.h
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
44
45
46
/*************************************************************************
> File Name: ConfigMgr.h
> Author: libo
> Created Time: Thu 12 Jul 2018 12:48:22 PM CST
************************************************************************/
#include<iostream>
#include "util/tc_singleton.h"
#include "util/tc_thread_rwlock.h"
#include "util/tc_mysql.h"
#include "Log.h"
#include "Semaphore.h"
#include<iostream>
#include<map>
using namespace taf;
using namespace std;
class ConfigMgr: public TC_Singleton<ConfigMgr, CreateUsingNew, DefaultLifetime>
{
public:
ConfigMgr()
{
}
virtual ~ConfigMgr()
{
}
int getServant(vector<string>&avServant);
void setServant(const string&asServant);
void init();
void updateThread();
taf::Int32 getServant();
int insertServant(const string&asServant);
protected:
TC_ThreadRWLocker cServantLock;
map<string,string> cMapServant;
Semaphore cSignal;
};