blob: fa64b9e9f105b57640d305c88f896c12ad54e70a (
plain)
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
47
48
49
|
// -*- C++ -*-
//=============================================================================
/**
* @file Update_Manager.h
*
* $Id$
*
* @author Huang-Ming Huang <hh1@cse.wustl.edu>
*/
//=============================================================================
#ifndef UPDATE_MANAGER_H
#define UPDATE_MANAGER_H
#include "ace/Synch_T.h"
#include "Dynamic_Bitset.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
typedef Dynamic_Bitset bit_vector;
class Update_Manager
{
public:
Update_Manager(ACE_Auto_Event& evt,
int num_backups,
int transaction_depth,
bool& success);
~Update_Manager();
void handle_reply(int id);
void handle_exception(int id);
private:
ACE_Auto_Event& evt_;
bit_vector replied_;
bit_vector signal_condition_;
bit_vector suicide_condition_;
int num_backups_;
int transaction_level_;
bool& success_;
ACE_SYNCH_MUTEX mutex_;
};
#endif
|