intarsys runtime library

de.intarsys.tools.monitor
Class MultiTrace

java.lang.Object
  extended by de.intarsys.tools.monitor.MultiTrace
All Implemented Interfaces:
ITrace

public class MultiTrace
extends Object
implements ITrace

A simple ITrace implementation that can compose a collection of other ITrace instances.

This class is not thread safe as its usage is filtered by a ThreadLocal and as such is access from a single thread only.


Constructor Summary
MultiTrace()
           
 
Method Summary
 void registerTrace(ITrace pTrace)
           
 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.
 void unregisterTrace(ITrace pTrace)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiTrace

public MultiTrace()
Method Detail

registerTrace

public void registerTrace(ITrace pTrace)

sample

public 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 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.

unregisterTrace

public void unregisterTrace(ITrace pTrace)

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.