blob: 4acd00f7406789802938cb7d7d494d4c19a5db56 [file] [log] [blame]
Pavlin Radoslavov295b2962014-10-23 01:12:41 -07001package org.onlab.onos.metrics.intent;
2
3import java.util.List;
4
5import com.codahale.metrics.Gauge;
6import com.codahale.metrics.Meter;
7import org.onlab.onos.net.intent.IntentEvent;
8
9/**
10 * Service interface exported by IntentMetrics.
11 */
12public 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}