maci::HeartbeatController

NAME
SYNOPSIS
Detailed Description
Member Typedef Documentation
Constructor & Destructor Documentation
Member Function Documentation
Friends And Related Function Documentation
Member Data Documentation
Author

NAME

maci::HeartbeatController −

SYNOPSIS

#include <maciHeartbeatController.h>

Public Member Functions

HeartbeatController (maci::Manager_ptr manager)

~HeartbeatController ()

int start (CORBA::ORB_ptr orb, CORBA::ULong invocationTimeout)

int stop ()

int registerClient (maci::Handle handle, maci::Client_ptr client)

int deregisterClient (maci::Handle handle)

maci::Manager_ptr getManager ()

Private Types

typedef ACE_Timer_Heap_T< ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall< ACE_SYNCH_RECURSIVE_MUTEX >, ACE_SYNCH_RECURSIVE_MUTEX > HB_TIMER_QUEUE

Trait for the queue type.

typedef ACE_Timer_Heap_Iterator_T< ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall< ACE_SYNCH_RECURSIVE_MUTEX >, ACE_SYNCH_RECURSIVE_MUTEX > HB_TIMER_QUEUE_ITERATOR

Trait for the queue iterator type.

typedef ACE_Thread_Timer_Queue_Adapter< HB_TIMER_QUEUE > HB_TIMER_THREAD

typedef ACE_Hash_Map_Manager< maci::Handle, long, ACE_Recursive_Thread_Mutex > HB_HASH_MAP

Trait for the hash map type.

typedef ACE_Hash_Map_Iterator< maci::Handle, long, ACE_Recursive_Thread_Mutex > HB_HASH_MAP_ITER

Trait for the hash map iterator type.

typedef ACE_Hash_Map_Entry< maci::Handle, long > HB_HASH_MAP_ENTRY

Trait for the hash map entry type.

Private Member Functions

int removeClient (maci::Handle handle)

Private Attributes

maci::Manager_var m_manager

Manager’s reference.

HB_TIMER_THREAD m_timerThread

Timer thread.

HB_HASH_MAP m_clients

Clients’ repository.

bool m_deactivated

Friends

class HeartbeatHandler

Detailed Description

HeartbeatController is a class controlling ’presence’ of the clients. It periodically calls client’s maci::Client::ping() method. If it fails (for several times) or the return value if false, it invokes maci::Manager::logout() method of the client.

Manager pings its clients (both GUI clients, as well as containers) repeatedly to verify that they still exist. The return value can be either ’true’, indicating that everything is OK with the client, of ’false’, indicating that client is malfunctioning. If CORBA::TRANSIENT exception is thrown, the Manager should retry the ping several times, and only then shall the client be assumed to be malfunctioning. If another exception is thrown, the client may be immediately assumed to be malfunctioning. Once the client is found to be malfunctioning, the Manager makes an implicit logout of the client.

Author:

Matej Sekoranja, Jozef Stefan Institute, Slovenia

Version:

Member Typedef Documentation

typedef ACE_Hash_Map_Manager<maci::Handle, long, ACE_Recursive_Thread_Mutex> maci::HeartbeatController::HB_HASH_MAP [private]

Trait for the hash map type.

typedef ACE_Hash_Map_Entry<maci::Handle, long> maci::HeartbeatController::HB_HASH_MAP_ENTRY [private]

Trait for the hash map entry type.

typedef ACE_Hash_Map_Iterator<maci::Handle, long, ACE_Recursive_Thread_Mutex> maci::HeartbeatController::HB_HASH_MAP_ITER [private]

Trait for the hash map iterator type.

typedef ACE_Timer_Heap_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX> maci::HeartbeatController::HB_TIMER_QUEUE [private]

Trait for the queue type.

typedef ACE_Timer_Heap_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX> maci::HeartbeatController::HB_TIMER_QUEUE_ITERATOR [private]

Trait for the queue iterator type.

typedef ACE_Thread_Timer_Queue_Adapter<HB_TIMER_QUEUE> maci::HeartbeatController::HB_TIMER_THREAD [private]

Constructor & Destructor Documentation

maci::HeartbeatController::HeartbeatController (maci::Manager_ptr manager) Constructor.

maci::HeartbeatController::~HeartbeatController () Destrcutor.

Member Function Documentation

int maci::HeartbeatController::deregisterClient (maci::Handle handle) Deregisters client to the heartbeat controller.

Returns:

0 on success

maci::Manager_ptr maci::HeartbeatController::getManager () Returns Manager’s reference.

Returns:

Manager’s reference

int maci::HeartbeatController::registerClient (maci::Handle handle, maci::Client_ptr client) Registers client to the heartbeat controller.

Returns:

0 on success

int maci::HeartbeatController::removeClient (maci::Handle handle) [private] Removes client from hash table.

Returns:

0 on success

int maci::HeartbeatController::start (CORBA::ORB_ptr orb, CORBA::ULong invocationTimeout) Starts controller.

Parameters:

orb CORBA orb.
invocationTimeout
CORBA ping() invocation timeout (0 means no timeout, 1 means use default).

Returns:

0 on success

int maci::HeartbeatController::stop () Stops controller.

Returns:

0 on success

Friends And Related Function Documentation

friend class HeartbeatHandler [friend]

Member Data Documentation

HB_HASH_MAP maci::HeartbeatController::m_clients [private]

Clients’ repository.

bool maci::HeartbeatController::m_deactivated [private]

maci::Manager_var maci::HeartbeatController::m_manager [private]

Manager’s reference.

HB_TIMER_THREAD maci::HeartbeatController::m_timerThread [private]

Timer thread.

Author

Generated automatically by Doxygen for ACS-2015.2 C++ API from the source code.