Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

HA Class Reference

#include <HA.h>

List of all members.


Detailed Description

The HA component monitors statically assigned primary HA components at remote nodes.

If a primary fails, the HA component takes over the failed query: (1) It does a lookup in the catalog to figure out what was running at the primary, (2) it instantiates all queries and stream subscriptions locally, and (3) it updates the catalog


Public Types

typedef map< MedusaID, ptr<
MonitoredNode > > 
MonitoredNodes
typedef map< MedusaID, ptr<
Secondary > > 
Secondaries

Public Member Functions

 HA (string id, string configFileName=DEFAULT_CONFIG_FILE, RecoveryMethod recovery_method=UPSTREAM_BACKUP)
 Constructor.
 ~HA ()
AsyncRPC< void > replicate_query (MedusaID primary, Query query)
 Replicate locally the given queries and subscriptions that are running at the primary.
AsyncRPC< void > replicate_subs (MedusaID primary, vector< Subscription > subs)
 Replicate locally the given subscriptions from primary.
RPC< void > keep_alive ()
 Invoked by backup HA component on the monitored nodes to determine their state (up or down).
RPC< void > failure_notification (MedusaID failed_node, Time time_failure_detected)
 Notification that a monitored node is down.
RPC< void > start ()
 Enable HA.
RPC< void > stop ()
 Suspend HA.
 NMSTL_RPC_OBJECT (HA)
RecoveryMethod get_recovery_method ()
 Returns the recovery method being used.
bool is_primary ()
 Determines if this HA component is for a primary engine.
RPC< vector< MedusaID > > get_secondary_ids ()
 Returns the secondaries.

Protected Member Functions

void in_thread_init ()


Member Typedef Documentation

typedef map<MedusaID, ptr<MonitoredNode> > HA::MonitoredNodes
 

typedef map<MedusaID, ptr<Secondary> > HA::Secondaries
 


Constructor & Destructor Documentation

HA::HA string  id,
string  configFileName = DEFAULT_CONFIG_FILE,
RecoveryMethod  recovery_method = UPSTREAM_BACKUP
 

Constructor.

Parameters:
id Name of the HA component (default is HA).
configFileName Name of the file listing the static assignments of backups to primaries.
recovery_method Is UPSTREAM_BACKUP (default), AMNESIA, PASSIVE_STANDBY, ACTIVE_STANDBY, or NO_HA.

HA::~HA  ) 
 


Member Function Documentation

RPC< void > HA::failure_notification MedusaID  failed_node,
Time  time_failure_detected
 

Notification that a monitored node is down.

Includes the time of the notification and the identifier of the failed node

RecoveryMethod HA::get_recovery_method  ) 
 

Returns the recovery method being used.

Returns:
the recovery method being used.

RPC< vector<MedusaID> > HA::get_secondary_ids  ) 
 

Returns the secondaries.

Must be made an RPC call because invoked by a separate module

Returns:
the secondaries.

void HA::in_thread_init  )  [protected]
 

bool HA::is_primary  ) 
 

Determines if this HA component is for a primary engine.

Returns:
true if this HA component is for a primary engine.

RPC< void > HA::keep_alive  ) 
 

Invoked by backup HA component on the monitored nodes to determine their state (up or down).

HA::NMSTL_RPC_OBJECT HA   ) 
 

AsyncRPC< void > HA::replicate_query MedusaID  primary,
Query  query
 

Replicate locally the given queries and subscriptions that are running at the primary.

AsyncRPC< void > HA::replicate_subs MedusaID  primary,
vector< Subscription >  subs
 

Replicate locally the given subscriptions from primary.

RPC< void > HA::start  ) 
 

Enable HA.

RPC< void > HA::stop  ) 
 

Suspend HA.


The documentation for this class was generated from the following files:
Generated on Fri Nov 12 15:15:23 2004 for Borealis by doxygen 1.3.8