Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 1 | package org.onlab.onos.metrics.intent; |
| 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.intent.IntentEvent; |
| 8 | |
| 9 | /** |
| 10 | * Service interface exported by IntentMetrics. |
| 11 | */ |
| 12 | public interface IntentMetricsService { |
| 13 | /** |
| 14 | * Gets the last saved intent events. |
| 15 | * |
| 16 | * @return the last saved intent events. |
| 17 | */ |
| 18 | public List<IntentEvent> getEvents(); |
| 19 | |
| 20 | /** |
| 21 | * Gets the Metrics' Gauge for the intent SUBMITTED event timestamp |
| 22 | * (ms from the epoch). |
| 23 | * |
| 24 | * @return the Metrics' Gauge for the intent SUBMITTED event timestamp |
| 25 | * (ms from the epoch) |
| 26 | */ |
| 27 | public Gauge<Long> intentSubmittedTimestampEpochMsGauge(); |
| 28 | |
| 29 | /** |
| 30 | * Gets the Metrics' Gauge for the intent INSTALLED event timestamp |
| 31 | * (ms from the epoch). |
| 32 | * |
| 33 | * @return the Metrics' Gauge for the intent INSTALLED event timestamp |
| 34 | * (ms from the epoch) |
| 35 | */ |
| 36 | public Gauge<Long> intentInstalledTimestampEpochMsGauge(); |
| 37 | |
| 38 | /** |
| 39 | * Gets the Metrics' Gauge for the intent WITHDRAW_REQUESTED event |
| 40 | * timestamp (ms from the epoch). |
| 41 | * |
| 42 | * TODO: This intent event is not implemented yet. |
| 43 | * |
| 44 | * @return the Metrics' Gauge for the intent WITHDRAW_REQUESTED event |
| 45 | * timestamp (ms from the epoch) |
| 46 | */ |
| 47 | public Gauge<Long> intentWithdrawRequestedTimestampEpochMsGauge(); |
| 48 | |
| 49 | /** |
| 50 | * Gets the Metrics' Gauge for the intent WITHDRAWN event timestamp |
| 51 | * (ms from the epoch). |
| 52 | * |
| 53 | * @return the Metrics' Gauge for the intent WITHDRAWN event timestamp |
| 54 | * (ms from the epoch) |
| 55 | */ |
| 56 | public Gauge<Long> intentWithdrawnTimestampEpochMsGauge(); |
| 57 | |
| 58 | /** |
| 59 | * Gets the Metrics' Meter for the submitted intents event rate. |
| 60 | * |
| 61 | * @return the Metrics' Meter for the submitted intents event rate |
| 62 | */ |
| 63 | public Meter intentSubmittedRateMeter(); |
| 64 | |
| 65 | /** |
| 66 | * Gets the Metrics' Meter for the installed intents event rate. |
| 67 | * |
| 68 | * @return the Metrics' Meter for the installed intent event rate |
| 69 | */ |
| 70 | public Meter intentInstalledRateMeter(); |
| 71 | |
| 72 | /** |
| 73 | * Gets the Metrics' Meter for the withdraw requested intents event rate. |
| 74 | * |
| 75 | * @return the Metrics' Meter for the withdraw requested intents event rate |
| 76 | */ |
| 77 | public Meter intentWithdrawRequestedRateMeter(); |
| 78 | |
| 79 | /** |
| 80 | * Gets the Metrics' Meter for the withdraw completed intents event rate. |
| 81 | * |
| 82 | * @return the Metrics' Meter for the withdraw completed intents event rate |
| 83 | */ |
| 84 | public Meter intentWithdrawnRateMeter(); |
| 85 | } |