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

Class FileEventHandlerBase

source code


Base class for file event handlers.

Instance Methods [hide private]
 
__init__(self, watch_manager)
Initializes this class.
source code
 
process_default(self, event)
Default processing event method.
source code
 
AddWatch(self, filename, mask)
Adds a file watch.
source code
 
RemoveWatch(self, handle)
Removes a handle from the watcher.
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

Instance Variables [hide private]
  watch_manager
Inotify watch manager
Method Details [hide private]

__init__(self, watch_manager)
(Constructor)

source code 

Initializes this class.

Parameters:
  • watch_manager (pyinotify.WatchManager) - inotify watch manager
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)

AddWatch(self, filename, mask)

source code 

Adds a file watch.

Parameters:
  • filename - Path to file
  • mask - Inotify event mask
Returns:
Result

RemoveWatch(self, handle)

source code 

Removes a handle from the watcher.

Parameters:
  • handle - Inotify handle
Returns:
Whether removal was successful