CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
file_watcher::EventHandler Class Referenceabstract

#include <file_watcher.h>

Inheritance diagram for file_watcher::EventHandler:

Public Member Functions

 EventHandler ()
 
virtual ~EventHandler ()
 
virtual bool Handle (const std::string &file_path, Event event, bool *clear_handler)=0
 

Detailed Description

Definition at line 25 of file file_watcher.h.

Constructor & Destructor Documentation

file_watcher::EventHandler::EventHandler ( )

Definition at line 17 of file file_watcher.cc.

file_watcher::EventHandler::~EventHandler ( )
virtual

Definition at line 19 of file file_watcher.cc.

Member Function Documentation

virtual bool file_watcher::EventHandler::Handle ( const std::string &  file_path,
Event  event,
bool *  clear_handler 
)
pure virtual

Handle function called per event

Parameters
file_path- the path of the file this event corresponds to
event- the type of event
clear_handler- (output) set this to true to have the event handler remove from the loop after this call

Should return false in case of failure.

Setting the clear_handler parameter to false means that the FileWatcher object will attempt to re-register the handler for the same file name in the case a file was delete - useful for continuously watching a file which may be deleted and recreated

Implemented in ResolvConfEventHandler.

Referenced by file_watcher::FileWatcherInotify::RunEventLoop(), and file_watcher::FileWatcherKqueue::RunEventLoop().

Here is the caller graph for this function:


The documentation for this class was generated from the following files: