Package ganeti :: Module asyncnotifier :: Class SingleFileEventHandler
[hide private]
[frames] | no frames]

Class SingleFileEventHandler

source code


Handle modify events for a single file.

Instance Methods [hide private]
 
__init__(self, watch_manager, callback, filename)
Constructor for SingleFileEventHandler
source code
 
enable(self)
Watch the given file
source code
 
disable(self)
Stop watching the given file
source code
 
process_IN_IGNORED(self, event) source code
 
process_IN_MODIFY(self, event) source code
 
process_default(self, event)
Default processing event method.
source code

Inherited from pyinotify.ProcessEvent: __call__, my_init, nested_pevent, process_IN_Q_OVERFLOW

Inherited from pyinotify._ProcessEvent: __repr__

Class Variables [hide private]

Inherited from pyinotify.ProcessEvent: pevent

Method Details [hide private]

__init__(self, watch_manager, callback, filename)
(Constructor)

source code 

Constructor for SingleFileEventHandler

Parameters:
  • watch_manager (pyinotify.WatchManager) - inotify watch manager
  • callback (function accepting a boolean) - function to call when an inotify event happens
  • filename (string) - config file to watch
Overrides: pyinotify.ProcessEvent.__init__

process_default(self, event)

source code 

Default processing event method. By default does nothing. Subclass ProcessEvent and redefine this method in order to modify its behavior.

Parameters:
  • event - Event to be processed. Can be of any type of events but IN_Q_OVERFLOW events (see method process_IN_Q_OVERFLOW).
Overrides: pyinotify.ProcessEvent.process_default
(inherited documentation)