intarsys runtime library

de.intarsys.tools.monitor
Interface IMonitor

All Known Implementing Classes:
AbstractMonitor, CompositeMonitor, CounterMonitor, MemberMonitor, MemoryMonitor, Monitor, NullMonitor, TimeMonitor

public interface IMonitor

A monitor allows "monitoring" events along thread as a sequence of samples.


Method Summary
 ITrace attach()
          Attach this IMonitor to the current Thread.
 void detach()
          Detach this IMonitor from the current Thread.
 ITrace getCurrentTrace()
          Return an ITrace that is currently under construction.
 Map getData()
          A map containing key/value pairs representing all statistical informations derived from the samples.
 Map getFormattedData()
          A map containing key/value pairs with string representations for the statistical information from getData.
 Logger getLogger()
          The associated Logger instance.
 String getName()
          The name of this monitor.
 List<ITrace> getTraces()
          A list of ITrace instances.
 void reset()
          Reset all information in this monitor.
 

Method Detail

attach

ITrace attach()
Attach this IMonitor to the current Thread.

Calling this method indicates the beginning of a measuring period represented by a ITrace. This method must always be paired with a call to "detach()".

Returns:
The new IMonitorTrace.

detach

void detach()
Detach this IMonitor from the current Thread. This call terminates the current ITrace instance.


getCurrentTrace

ITrace getCurrentTrace()
Return an ITrace that is currently under construction.

Returns:
The ITrace that is currently under construction.

getData

Map getData()
A map containing key/value pairs representing all statistical informations derived from the samples.

Returns:
A map containing key/value pairs representing all statistical informations derived from the samples.

getFormattedData

Map getFormattedData()
A map containing key/value pairs with string representations for the statistical information from getData.

Returns:
A map containing key/value pairs with string representations for the statistical information from getData.

getLogger

Logger getLogger()
The associated Logger instance.

Returns:
The associated Logger instance.

getName

String getName()
The name of this monitor.

Returns:
The name of this monitor.

getTraces

List<ITrace> getTraces()
A list of ITrace instances.

This may be null if no traces are stored (see setCollectAll()).

Returns:
A list of ITrace instances.

reset

void reset()
Reset all information in this monitor.


intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.