CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
esMonitoring.AsyncLineReaderTimeoutMixin Class Reference
Inheritance diagram for esMonitoring.AsyncLineReaderTimeoutMixin:
esMonitoring.AsyncLineReaderMixin esMonitoring.FDOutputListener

Public Member Functions

def __init__
 
def handle_read
 
def readable
 
- Public Member Functions inherited from esMonitoring.AsyncLineReaderMixin
def __init__
 
def handle_close
 
def handle_line
 
def handle_read
 

Public Attributes

 last_read
 
 timeout_secs
 
- Public Attributes inherited from esMonitoring.AsyncLineReaderMixin
 line_buf
 not needed, since asyncore automatically handles close if len(rbuf) == 0: self.handle_close() return More...
 

Detailed Description

Definition at line 246 of file esMonitoring.py.

Constructor & Destructor Documentation

def esMonitoring.AsyncLineReaderTimeoutMixin.__init__ (   self,
  timeout_secs 
)

Definition at line 247 of file esMonitoring.py.

248  def __init__(self, timeout_secs):
249  self.timeout_secs = timeout_secs
250  self.last_read = time.time()
251 
252  super(AsyncLineReaderTimeoutMixin, self).__init__()

Member Function Documentation

def esMonitoring.AsyncLineReaderTimeoutMixin.handle_read (   self)

Definition at line 253 of file esMonitoring.py.

References esMonitoring.AsyncLineReaderTimeoutMixin.last_read.

254  def handle_read(self):
255  self.last_read = time.time()
256  AsyncLineReaderMixin.handle_read(self)
def esMonitoring.AsyncLineReaderTimeoutMixin.readable (   self)

Definition at line 257 of file esMonitoring.py.

References ztee.GZipLog.handle_timeout(), esMonitoring.FDOutputListener.handle_timeout(), esMonitoring.AsyncLineReaderTimeoutMixin.last_read, and esMonitoring.AsyncLineReaderTimeoutMixin.timeout_secs.

258  def readable(self):
259  if (time.time() - self.last_read) >= self.timeout_secs:
260  self.last_read = time.time()
261  self.handle_timeout()
262 
263  return super(AsyncLineReaderTimeoutMixin, self).readable()

Member Data Documentation

esMonitoring.AsyncLineReaderTimeoutMixin.last_read

Definition at line 249 of file esMonitoring.py.

Referenced by esMonitoring.AsyncLineReaderTimeoutMixin.handle_read(), and esMonitoring.AsyncLineReaderTimeoutMixin.readable().

esMonitoring.AsyncLineReaderTimeoutMixin.timeout_secs

Definition at line 248 of file esMonitoring.py.

Referenced by esMonitoring.AsyncLineReaderTimeoutMixin.readable().