Pavlin Radoslavov | 64d9e47 | 2014-10-21 22:01:08 -0700 | [diff] [blame^] | 1 | package org.onlab.onos.metrics.topology; |
| 2 | |
| 3 | import java.util.List; |
| 4 | |
| 5 | import com.codahale.metrics.Gauge; |
| 6 | import com.codahale.metrics.Meter; |
| 7 | import org.onlab.onos.net.topology.TopologyEvent; |
| 8 | |
| 9 | /** |
| 10 | * Service interface exported by TopologyMetrics. |
| 11 | */ |
| 12 | public interface TopologyMetricsService { |
| 13 | /** |
| 14 | * Gets the last saved topology events. |
| 15 | * |
| 16 | * @return the last saved topology events. |
| 17 | */ |
| 18 | public List<TopologyEvent> getEvents(); |
| 19 | |
| 20 | /** |
| 21 | * Gets the Metrics' Gauge for the last topology event timestamp |
| 22 | * (ms from the epoch). |
| 23 | * |
| 24 | * @return the Metrics' Gauge for the last topology event timestamp |
| 25 | * (ms from the epoch) |
| 26 | */ |
| 27 | public Gauge<Long> lastEventTimestampEpochMsGauge(); |
| 28 | |
| 29 | /** |
| 30 | * Gets the Metrics' Meter for the topology events rate. |
| 31 | * |
| 32 | * @return the Metrics' Meter for the topology events rate |
| 33 | */ |
| 34 | public Meter eventRateMeter(); |
| 35 | } |