diff options
author | Phil Mesnier <mesnier_p@ociweb.com> | 2013-05-20 16:42:50 +0000 |
---|---|---|
committer | Phil Mesnier <mesnier_p@ociweb.com> | 2013-05-20 16:42:50 +0000 |
commit | 74d380f3de656135e0f1fcabcd8ed5bd586343e9 (patch) | |
tree | 76caaf3f641b36ba11cdc91eece7fb8a873e9fce /TAO/orbsvcs/ImplRepo_Service/LiveCheck.h | |
parent | 16fb18bf9582fda2b9fd4d9fba934f3a5e8e49ef (diff) | |
download | ATCD-74d380f3de656135e0f1fcabcd8ed5bd586343e9.tar.gz |
Mon May 20 16:41:51 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
Diffstat (limited to 'TAO/orbsvcs/ImplRepo_Service/LiveCheck.h')
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/LiveCheck.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h index da5195b9e79..005ae3a3005 100644 --- a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h +++ b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h @@ -26,6 +26,7 @@ #include "tao/Intrusive_Ref_Count_Handle_T.h" class LiveCheck; +class LiveEntry; //--------------------------------------------------------------------------- /* @@ -34,9 +35,11 @@ class LiveCheck; * @brief indication of the known condition of a target server * * LS_UNKNOWN - The server hasn't yet been pinged + * LS_PING_AWAY - A ping request has been issued, waiting for reply * LS_DEAD - The ping failed for reasons other than POA Activation * LS_ALIVE - The server positively acknowledged a ping * LS_TRANSIENT - The server connected, but acively raised a transient + * LS_LAST_TRANSIENT - The maximum number of retries is reached * LS_TIMEDOUT - The server connected, but never returned any result. */ enum LiveStatus { @@ -71,6 +74,12 @@ class Locator_Export LiveListener virtual ~LiveListener (void); + /// sets the initial status volue, set by entry during an add_listener call + void entry (const LiveEntry *entry); + + /// Query the status of the associated entry + LiveStatus status (void) const; + /// called by the asynch ping receiver when a reply or an exception /// is received. Returns true if finished listening virtual bool status_changed (LiveStatus status) = 0; @@ -81,9 +90,11 @@ class Locator_Export LiveListener LiveListener *_add_ref (void); void _remove_ref (void); - private: + protected: ACE_CString server_; + const LiveEntry *entry_; + private: int refcount_; TAO_SYNCH_MUTEX lock_; }; @@ -115,6 +126,9 @@ class Locator_Export LiveEntry void status (LiveStatus l); void reset_status (void); + /// the current state value as text + static const char *status_name (LiveStatus s); + void update_listeners (void); bool validate_ping (bool &want_reping, ACE_Time_Value &next); void do_ping (PortableServer::POA_ptr poa); |