ch.elca.el4j.services.monitoring
Class DbLogger

java.lang.Object
  extended by ch.elca.el4j.services.monitoring.DbLogger

public final class DbLogger
extends Object

A simple DB-Logger that counts the number of DB roundtrips (single-threaded, i.e. roundtrips are not associated with executing thread). It is a minimalistic wrapper for MonitorFactory, so use JAMons MonitorFactory directly if you need more control.

Author:
Stefan Wismer (SWI)
File-location:
DbLogger
Last check-in date:
2009-08-04 14:25:40 +0200 (Di, 04. Aug 2009) by swismer for revision 3874

Method Summary
static void disable()
          Stop monitoring.
static void enable()
          Start monitoring.
static int getRoundtripCount()
           
static void reset()
          Reset monitoring.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

enable

public static void enable()
Start monitoring.


disable

public static void disable()
Stop monitoring.


getRoundtripCount

public static int getRoundtripCount()
Returns:
the number of DB roundtrips detected since monitor has been activated (which is always done on startup) or last reset. If monitoring is not available -1 is returned.

reset

public static void reset()
Reset monitoring. All acquired values get lost.



Copyright © 2005-2011 ELCA. All Rights Reserved.