intarsys runtime library

de.intarsys.tools.monitor
Class AbstractMonitorTrace

java.lang.Object
  extended by de.intarsys.tools.monitor.AbstractMonitorTrace
All Implemented Interfaces:
ITrace
Direct Known Subclasses:
CompositeMonitorTrace, MonitorTrace

public abstract class AbstractMonitorTrace
extends Object
implements ITrace

An abstract superclass to ease implementation of monitor trace objects.

This class does not have to be synchronized anywhere.


Constructor Summary
AbstractMonitorTrace(AbstractMonitor owner)
          Create a MonitorTrace.
 
Method Summary
 Map getTags()
           
 ISample sample(Level level, String description)
          Take a sample and tag it with description.
 void tag(String key, Object tag)
          Add a key/value pair to this.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMonitorTrace

public AbstractMonitorTrace(AbstractMonitor owner)
Create a MonitorTrace.

Parameters:
owner - The monitor that created the trace.
Method Detail

getTags

public Map getTags()

sample

public final ISample sample(Level level,
                            String description)
Description copied from interface: ITrace
Take a sample and tag it with description. The sample is stored in addition to the "fix" start and stop sample.

Specified by:
sample in interface ITrace

tag

public final void tag(String key,
                      Object tag)
Description copied from interface: ITrace
Add a key/value pair to this. This data is not interpreted by the monitor.

Specified by:
tag in interface ITrace
Parameters:
key - The name of the value to store.
tag - The object to store with the measurement.

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.