Package ClusterShell :: Package Engine :: Module Engine :: Class _EngineTimerQ
[hide private]
[frames] | no frames]

Class _EngineTimerQ

source code

Nested Classes [hide private]
  _EngineTimerCase
Helper class that allows comparisons of fire times, to be easily used in an heapq.
Instance Methods [hide private]
 
__init__(self, engine)
Initializer.
source code
 
__len__(self)
Return the number of active timers.
source code
 
schedule(self, client)
Insert and arm a client's timer.
source code
 
reschedule(self, client)
Re-insert client's timer.
source code
 
invalidate(self, client)
Invalidate client's timer.
source code
 
_dequeue_disarmed(self)
Dequeue disarmed timers (sort of garbage collection).
source code
 
fire_expired(self)
Remove expired timers from the queue and fire associated clients.
source code
 
nextfire_delay(self)
Return next timer fire delay (relative time).
source code
 
clear(self)
Stop and clear all timers.
source code
Method Details [hide private]

invalidate(self, client)

source code 

Invalidate client's timer. Current implementation doesn't really remove the timer, but simply flags it as disarmed.