Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 3 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 7 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 15 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.metrics.intent; |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 17 | |
| 18 | import java.util.List; |
Pavlin Radoslavov | ccc2e33 | 2014-10-23 13:46:28 -0700 | [diff] [blame] | 19 | import org.onlab.metrics.EventMetric; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 20 | import org.onosproject.net.intent.IntentEvent; |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 21 | |
| 22 | /** |
| 23 | * Service interface exported by IntentMetrics. |
| 24 | */ |
| 25 | public interface IntentMetricsService { |
| 26 | /** |
| 27 | * Gets the last saved intent events. |
| 28 | * |
Pavlin Radoslavov | 166c547 | 2015-03-18 11:47:50 -0700 | [diff] [blame] | 29 | * @return the last saved intent events |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 30 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 31 | List<IntentEvent> getEvents(); |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 32 | |
| 33 | /** |
Brian O'Connor | 7a71d5d | 2014-12-02 00:12:27 -0800 | [diff] [blame] | 34 | * Gets the Event Metric for the intent INSTALL_REQ events. |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 35 | * |
Pavlin Radoslavov | 166c547 | 2015-03-18 11:47:50 -0700 | [diff] [blame] | 36 | * @return the Event Metric for the intent INSTALL_REQ events |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 37 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 38 | EventMetric intentSubmittedEventMetric(); |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 39 | |
| 40 | /** |
Pavlin Radoslavov | ccc2e33 | 2014-10-23 13:46:28 -0700 | [diff] [blame] | 41 | * Gets the Event Metric for the intent INSTALLED events. |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 42 | * |
Pavlin Radoslavov | 166c547 | 2015-03-18 11:47:50 -0700 | [diff] [blame] | 43 | * @return the Event Metric for the intent INSTALLED events |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 44 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 45 | EventMetric intentInstalledEventMetric(); |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 46 | |
| 47 | /** |
Pavlin Radoslavov | 0f8a1e4 | 2015-01-13 11:52:52 -0800 | [diff] [blame] | 48 | * Gets the Event Metric for the intent FAILED events. |
| 49 | * |
Pavlin Radoslavov | 166c547 | 2015-03-18 11:47:50 -0700 | [diff] [blame] | 50 | * @return the Event Metric for the intent FAILED events |
Pavlin Radoslavov | 0f8a1e4 | 2015-01-13 11:52:52 -0800 | [diff] [blame] | 51 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 52 | EventMetric intentFailedEventMetric(); |
Pavlin Radoslavov | 0f8a1e4 | 2015-01-13 11:52:52 -0800 | [diff] [blame] | 53 | |
| 54 | /** |
Pavlin Radoslavov | 4749f84 | 2014-12-02 13:11:22 -0800 | [diff] [blame] | 55 | * Gets the Event Metric for the intent WITHDRAW_REQ events. |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 56 | * |
Pavlin Radoslavov | 166c547 | 2015-03-18 11:47:50 -0700 | [diff] [blame] | 57 | * @return the Event Metric for the intent WITHDRAW_REQ events |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 58 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 59 | EventMetric intentWithdrawRequestedEventMetric(); |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 60 | |
| 61 | /** |
Pavlin Radoslavov | ccc2e33 | 2014-10-23 13:46:28 -0700 | [diff] [blame] | 62 | * Gets the Event Metric for the intent WITHDRAWN events. |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 63 | * |
Pavlin Radoslavov | 166c547 | 2015-03-18 11:47:50 -0700 | [diff] [blame] | 64 | * @return the Event Metric for the intent WITHDRAWN events |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 65 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 66 | EventMetric intentWithdrawnEventMetric(); |
Pavlin Radoslavov | 166c547 | 2015-03-18 11:47:50 -0700 | [diff] [blame] | 67 | |
| 68 | /** |
| 69 | * Gets the Event Metric for the intent PURGED events. |
| 70 | * |
| 71 | * @return the Event Metric for the intent PURGED events |
| 72 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 73 | EventMetric intentPurgedEventMetric(); |
Pavlin Radoslavov | 295b296 | 2014-10-23 01:12:41 -0700 | [diff] [blame] | 74 | } |