Changeset 5838 for source/ariba/overlay/OverlayBootstrap.h
- Timestamp:
- Aug 11, 2009, 8:39:47 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/OverlayBootstrap.h
r4866 r5838 42 42 #include <string> 43 43 #include <sstream> 44 #include <ctime> 45 #include <deque> 46 #include <boost/thread/mutex.hpp> 44 47 #include "ariba/utility/logging/Logging.h" 45 48 #include "ariba/utility/types.h" 49 #include "ariba/utility/system/Timer.h" 46 50 #include "ariba/utility/bootstrap/BootstrapManager.h" 47 51 #include "ariba/utility/bootstrap/BootstrapInformationCallback.h" … … 52 56 #include "ariba/utility/system/SystemEventType.h" 53 57 58 using std::deque; 54 59 using std::string; 55 60 using std::ostringstream; … … 62 67 using ariba::utility::SystemEvent; 63 68 using ariba::utility::SystemQueue; 69 using ariba::utility::Timer; 64 70 using ariba::utility::SystemEventListener; 65 71 … … 81 87 void revoke(); 82 88 89 void recordJoin(const EndpointDescriptor& _ep); 90 83 91 protected: 84 92 virtual void handleSystemEvent(const SystemEvent& event); … … 86 94 87 95 private: 88 typedef struct _EventData { 96 class EventData { 97 public: 89 98 SpoVNetID spovnetid; 90 99 NodeID nodeid; 91 100 EndpointDescriptor endpoint; 92 } EventData;101 }; 93 102 94 103 BootstrapManager& manager; … … 98 107 string randname; 99 108 109 class JoinData { 110 public: 111 time_t timestamp; 112 EventData data; 113 114 JoinData(const EventData& _data){ 115 timestamp = time(NULL); 116 data = _data; 117 } 118 119 JoinData(){ 120 timestamp = time(NULL); 121 } 122 }; 123 124 class WatchdogTimer : public Timer { 125 public: 126 WatchdogTimer(OverlayBootstrap* _obj); 127 void startWatchdog(); 128 void stopWatchdog(); 129 protected: 130 virtual void eventFunction(); 131 private: 132 OverlayBootstrap* obj; 133 }; 134 135 typedef deque<JoinData> JoinStack; 136 JoinStack lastJoines; 137 boost::mutex lastJoinesMutex; 138 WatchdogTimer watchtimer; 139 void checkOverlayStatus(); 100 140 }; 101 141
Note:
See TracChangeset
for help on using the changeset viewer.