blob: 6948c610c3baa7ce9c10f12c47c37487e3faee77 (
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
57
58
59
60
|
// -*- C++ -*-
// $Id$
// ============================================================================
//
// = LIBRARY
// orbsvcs
//
// = FILENAME
// Round_Robin_Strategy.h
//
// = AUTHOR
// Ossama Othman <ossama@uci.edu>
//
// ============================================================================
#include "orbsvcs/LoadBalancingS.h"
#include "orbsvcs/LoadBalancing/LoadBalancing_Strategy.h"
#ifndef ROUND_ROBIN_STRATEGY_H
#define ROUND_ROBIN_STRATEGY_H
// Forward declarations
class ReplicaProxy_Impl;
template class ACE_Unbounded_Set<ReplicaProxy_Impl *>;
typedef ACE_Unbounded_Set<ReplicaProxy_Impl *>
ReplicaProxySet;
class Round_Robin_Strategy : public Load_Balancing_Strategy
{
// = TITLE
// Round Robin load balancing strategy
// = DESCRIPTION
// Simple load balancing strategy that causes requests to be
// forwarded to next Replica in the set, i.e. in a "round robin"
// fashion.
public:
Round_Robin_Strategy (void);
// Constructor.
virtual CORBA::Object_ptr replica (CORBA_Environment &ACE_TRY_ENV);
// Return the object reference to the Replica to which requests should
// be redirected.
private:
ReplicaProxySet proxies_;
// Set containing the ReplicaProxy servants.
};
#endif /* ROUND_ROBIN_STRATEGY_H */
|