Apache Log4cxx  Version 1.5.0
Loading...
Searching...
No Matches
log4cxx::helpers::FileWatchdog Class Referenceabstract

Check every now and then that a certain file has not changed. More...

#include <filewatchdog.h>

Public Member Functions

virtual ~FileWatchdog ()
void setDelay (long delay)
 Use delay as the number of milliseconds to wait between each check for file changes.
void setFile (const File &filename)
 Change the watched file to filename.
void start ()
 Create an asynchronous task that periodically checks for a file change after first calling doOnChange().
void stop ()
 Stop the task that periodically checks for a file change.
bool is_active ()
 Is the task that periodically checks for a file change running?

Static Public Member Functions

static void stopAll ()
 Stop all tasks that periodically check for a file change.

Static Public Attributes

static long DEFAULT_DELAY
 The default delay between every file modification check, set to 60 seconds.

Protected Member Functions

 FileWatchdog (const File &filename)
virtual void doOnChange ()=0
void checkAndConfigure ()
const Filefile ()

Detailed Description

Check every now and then that a certain file has not changed.

If it has, then call the doOnChange method.

Constructor & Destructor Documentation

◆ ~FileWatchdog()

virtual log4cxx::helpers::FileWatchdog::~FileWatchdog ( )
virtual

◆ FileWatchdog()

log4cxx::helpers::FileWatchdog::FileWatchdog ( const File & filename)
protected

Member Function Documentation

◆ checkAndConfigure()

void log4cxx::helpers::FileWatchdog::checkAndConfigure ( )
protected

◆ doOnChange()

virtual void log4cxx::helpers::FileWatchdog::doOnChange ( )
protectedpure virtual

◆ file()

const File & log4cxx::helpers::FileWatchdog::file ( )
protected

◆ is_active()

bool log4cxx::helpers::FileWatchdog::is_active ( )

Is the task that periodically checks for a file change running?

◆ setDelay()

void log4cxx::helpers::FileWatchdog::setDelay ( long delay)

Use delay as the number of milliseconds to wait between each check for file changes.

◆ setFile()

void log4cxx::helpers::FileWatchdog::setFile ( const File & filename)

Change the watched file to filename.

◆ start()

void log4cxx::helpers::FileWatchdog::start ( )

Create an asynchronous task that periodically checks for a file change after first calling doOnChange().

◆ stop()

void log4cxx::helpers::FileWatchdog::stop ( )

Stop the task that periodically checks for a file change.

◆ stopAll()

void log4cxx::helpers::FileWatchdog::stopAll ( )
static

Stop all tasks that periodically check for a file change.

Member Data Documentation

◆ DEFAULT_DELAY

long log4cxx::helpers::FileWatchdog::DEFAULT_DELAY
static

The default delay between every file modification check, set to 60 seconds.


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