org.apache.commons.monitoring
Interface Repository

All Known Subinterfaces:
Repository.Observable
All Known Implementing Classes:
AbstractRepository, ConfigurableImplementationsRepository, CreateMonitorsOnDemandRepository, DefaultRepository, HistorizedRepositoryDecorator, ObservableRepository, SecondaryRepository

public interface Repository

Author:
Nicolas De Loof

Nested Class Summary
static interface Repository.Listener
          Listener interface to get notified on repository events
static interface Repository.Observable
          Repository that accepts Listeners and notify them on repository events
 
Method Summary
 java.util.Set<java.lang.String> getCategories()
           
 Monitor getMonitor(java.lang.String name)
           
 Monitor getMonitor(java.lang.String name, java.lang.String category)
           
 Monitor getMonitor(java.lang.String name, java.lang.String category, java.lang.String subsystem)
           
 java.util.Collection<Monitor> getMonitors()
           
 java.util.Collection<Monitor> getMonitorsFromCategory(java.lang.String category)
           
 java.util.Collection<Monitor> getMonitorsFromSubSystem(java.lang.String subsystem)
           
 java.util.Set<java.lang.String> getSubSystems()
           
 void reset()
          Reset all monitors (don't remove them)
 StopWatch start(Monitor monitor)
          Start a StopWatch to monitor execution
 

Method Detail

getMonitor

Monitor getMonitor(java.lang.String name)

getMonitor

Monitor getMonitor(java.lang.String name,
                   java.lang.String category)

getMonitor

Monitor getMonitor(java.lang.String name,
                   java.lang.String category,
                   java.lang.String subsystem)

getMonitors

java.util.Collection<Monitor> getMonitors()
Returns:
all monitors registered in the repository

getMonitorsFromCategory

java.util.Collection<Monitor> getMonitorsFromCategory(java.lang.String category)
Parameters:
category - a category name
Returns:
all monitors in the repository that declare this category in there Key

getMonitorsFromSubSystem

java.util.Collection<Monitor> getMonitorsFromSubSystem(java.lang.String subsystem)
Parameters:
subsystem - a subsystem name
Returns:
all monitors in the repository that declare this subsystem in there Key

getCategories

java.util.Set<java.lang.String> getCategories()
Returns:
the categories declared by monitors in the repository

getSubSystems

java.util.Set<java.lang.String> getSubSystems()
Returns:
the subsystems declared by monitors in the repository

reset

void reset()
Reset all monitors (don't remove them)


start

StopWatch start(Monitor monitor)
Start a StopWatch to monitor execution

Parameters:
monitor - the monitor associated with the process
Returns:
a running StopWatch


Copyright © 2008 The Apache Software Foundation. All Rights Reserved.