blob: b14db04fa9cb80bee9adf4ae48d9949821ea1178 (
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
61
62
63
64
65
66
67
68
69
70
71
72
|
// -*- C++ -*-
//=============================================================================
/**
* @file LoadBalancing_Strategy.h
*
* $Id$
*
* @author Ossama Othman <ossama@uci.edu>
*/
//=============================================================================
#ifndef TAO_LB_BALANCING_STRATEGY_H
#define TAO_LB_BALANCING_STRATEGY_H
#include "ace/pre.h"
#include "LoadBalancing_export.h"
# if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
# endif /* ACE_LACKS_PRAGMA_ONCE */
#include "orbsvcs/LoadBalancingS.h"
#include "LB_Location_Map.h"
// class TAO_LB_ReplicaProxy;
struct TAO_LB_ObjectGroup_Map_Entry;
/**
* @class TAO_LB_Balancing_Strategy
*
* @brief Load balancing strategy abstract base class.
*
* This abstract base class defines the interface load balancing
* strategies should implement.
*/
class TAO_LoadBalancing_Export TAO_LB_Balancing_Strategy
{
public:
/// Destructor
virtual ~TAO_LB_Balancing_Strategy (void);
// @@ The name of the method should be more meaningful, what about:
// select_replica(), select_unloaded_replica() or something like
// that?
/// Return the object reference to the Replica to which requests should
/// be redirected.
virtual CORBA::Object_ptr replica (TAO_LB_ObjectGroup_Map_Entry *entry,
CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
/// Analyze the loads at each location and force client request
/// redirection, if necessary, or disable the redirection at a given
/// location.
/**
* @@ Ossama: see my comments on LoadBalancing_i about changing the
* signature of this method.
*/
virtual void analyze_loads (TAO_LB_Location_Map &location_map,
CORBA::Environment &ACE_TRY_ENV);
};
#include "ace/post.h"
#endif /* TAO_LB_BALANCING_STRATEGY_H */
|