Remove concept of multiple timer managers

- All timers are now handled by a single global timer manager, which simplifies how they handled by the IOSource manager.
- This change flows down a number of changes to other parts of the code. The timer manager tag field is removed, which means that matching connections to a timer manager is also removed. This removes the ability to tag a connection as internal or external, since that's how the connections where differentiated. This in turn removes the `current_conns_extern` field from the `ConnStats` record type in the script layer.
This commit is contained in:
Tim Wojtulewicz 2019-12-02 17:10:57 -07:00
parent 2dcc936787
commit be42608b51
15 changed files with 28 additions and 284 deletions

View file

@ -228,11 +228,6 @@ public:
void Describe(ODesc* d) const override;
void IDString(ODesc* d) const;
TimerMgr* GetTimerMgr() const;
// Returns true if connection has been received externally.
bool IsExternal() const { return conn_timer_mgr != 0; }
// Statistics.
// Just a lower bound.
@ -243,8 +238,6 @@ public:
{ return total_connections; }
static uint64_t CurrentConnections()
{ return current_connections; }
static uint64_t CurrentExternalConnections()
{ return external_connections; }
// Returns true if the history was already seen, false otherwise.
int CheckHistory(uint32_t mask, char code)
@ -320,8 +313,6 @@ protected:
ConnIDKey key;
bool key_valid;
// Timer manager to use for this conn (or nil).
std::string* conn_timer_mgr;
timer_list timers;
IPAddr orig_addr;
@ -353,7 +344,6 @@ protected:
// Count number of connections.
static uint64_t total_connections;
static uint64_t current_connections;
static uint64_t external_connections;
string history;
uint32_t hist_seen;