Package cdc.perfs.api
Class RuntimeManager
- java.lang.Object
-
- cdc.perfs.api.RuntimeManager
-
public final class RuntimeManager extends Object
Main API used to create sources, probes and measures.- Author:
- Damien Carbonne
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceRuntimeManager.RuntimeService
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RuntimeProbecreateProbe(Source source)Creates a probe at the MINOR level.static RuntimeProbecreateProbe(Source source, MeasureLevel level)Creates a probe that can be used to create measures at a given level and associated to a source.static SourcegetSource(Class<?> cls)Returns the source associated to a class.static SourcegetSource(String name)Returns the shared source that has a given name.
-
-
-
Method Detail
-
getSource
public static Source getSource(String name)
Returns the shared source that has a given name.If a source with that name already exists, then it returns it. Otherwise, creates a new Source and returns it.
- Parameters:
name- Name of the source.- Returns:
- The shared source that is named name.
-
getSource
public static Source getSource(Class<?> cls)
Returns the source associated to a class.Equivalent to getSource(klass.getCanonicalName())
- Parameters:
cls- The class whose name will be associated to source.- Returns:
- getSource(cls.getCanonicalName())
-
createProbe
public static RuntimeProbe createProbe(Source source, MeasureLevel level)
Creates a probe that can be used to create measures at a given level and associated to a source.- Parameters:
source- The source for which a probe must be created.level- The level of generated measures.- Returns:
- An appropriate probe (matching source and level).
-
createProbe
public static RuntimeProbe createProbe(Source source)
Creates a probe at the MINOR level.- Parameters:
source- The source for which a probe must be created.- Returns:
- An appropriate probe (matching source and MINOR level).
-
-