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; |
Pavlin Radoslavov | 5ba8b28 | 2014-10-23 01:03:10 -0700 | [diff] [blame] | 7 | import org.onlab.onos.event.Event; |
Pavlin Radoslavov | 64d9e47 | 2014-10-21 22:01:08 -0700 | [diff] [blame] | 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 | */ |
Pavlin Radoslavov | 5ba8b28 | 2014-10-23 01:03:10 -0700 | [diff] [blame] | 18 | public List<Event> getEvents(); |
Pavlin Radoslavov | 64d9e47 | 2014-10-21 22:01:08 -0700 | [diff] [blame] | 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 | } |