dk.netarkivet.common.utils
Class LivenessLogger

java.lang.Object
  extended by java.util.TimerTask
      extended by dk.netarkivet.common.utils.LivenessLogger
All Implemented Interfaces:
java.lang.Runnable

public class LivenessLogger
extends java.util.TimerTask

This class logs lifesigns at level FINE every 2 minutes. This is implemented by using the Timer class.

See Also:
This class is instantiated by ApplicationUtils.startApp().

Field Summary
static long LIFESIGNS_FREQUENCY
          The predefined frequency in milliseconds for this LivenessLogger.
 
Constructor Summary
LivenessLogger(java.lang.Class theClass)
          The constructor for the LivenessLogger class.
 
Method Summary
 void run()
          This method writes a lifesign-logmessage to the log.
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIFESIGNS_FREQUENCY

public static final long LIFESIGNS_FREQUENCY
The predefined frequency in milliseconds for this LivenessLogger.

See Also:
Constant Field Values
Constructor Detail

LivenessLogger

public LivenessLogger(java.lang.Class theClass)
The constructor for the LivenessLogger class.

Parameters:
theClass - the class to log for.
Method Detail

run

public void run()
This method writes a lifesign-logmessage to the log. It is performed the first time immediately after instantiation, and then every 2 minutes.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in class java.util.TimerTask