1 package fr.in2p3.jsaga.impl.monitoring;
2
3
4
5
6
7
8
9
10
11
12
13
14
15 public class MetricFactoryImpl<E> {
16 private AbstractMonitorableImpl m_monitorable;
17
18 public MetricFactoryImpl(AbstractMonitorableImpl monitorable) {
19 m_monitorable = monitorable;
20 }
21
22 public MetricImpl<E> createAndRegister(String name, String desc, MetricMode mode, String unit, MetricType type, E initialValue) {
23 MetricImpl<E> metric = new MetricImpl<E>(m_monitorable, name, desc, mode, unit, type, initialValue);
24 m_monitorable._addMetric(name, metric);
25 return metric;
26 }
27 }