blob: 5cb5792d3c1686cf8a889dd886c9d0d36a3bd0b3 (
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
50
51
52
53
54
55
56
|
// -*- C++ -*-
//=============================================================================
/**
* @file AMI_Replication_Strategy.h
*
* $Id$
*
* @author Huang-Ming Huang <hh1@cse.wustl.edu>
*/
//=============================================================================
#ifndef AMI_REPLICATION_STRATEGY_H
#define AMI_REPLICATION_STRATEGY_H
#include "ace/Task.h"
#include "tao/PortableServer/PortableServerC.h"
#include "orbsvcs/FTRT_GroupManagerC.h"
#include "Replication_Strategy.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
/**
* @class AMI_Replication_Strategy.
*
* @brief Used by backup replicas when AMI calls are used for replicating requests.
*/
class AMI_Replication_Strategy: public Replication_Strategy
{
public:
/**
* @param mt Specifies whether multithreaded ORB is used.
*/
AMI_Replication_Strategy(bool mt);
~AMI_Replication_Strategy();
virtual void replicate_request(const FTRT::State& state,
RollbackOperation rollback,
const FtRtecEventChannelAdmin::ObjectId& oid
ACE_ENV_ARG_DECL);
virtual void add_member(const FTRT::ManagerInfo & info,
CORBA::ULong object_group_ref_version
ACE_ENV_ARG_DECL);
virtual Replication_Strategy* make_primary_strategy();
virtual int acquire_read (void);
virtual int acquire_write (void);
virtual int release (void);
private:
bool mt_;
};
#endif
|