blob: 5d1f8d270ae2a4d1278b465facf85ae2f0740bba [file] [log] [blame]
Thomas Vachuska781d18b2014-10-27 10:31:25 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Thomas Vachuska781d18b2014-10-27 10:31:25 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * 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 Vachuska781d18b2014-10-27 10:31:25 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * 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 Vachuska781d18b2014-10-27 10:31:25 -070015 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.metrics.intent;
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070017
18import java.util.List;
Pavlin Radoslavovccc2e332014-10-23 13:46:28 -070019import org.onlab.metrics.EventMetric;
Brian O'Connorabafb502014-12-02 22:26:20 -080020import org.onosproject.net.intent.IntentEvent;
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070021
22/**
23 * Service interface exported by IntentMetrics.
24 */
25public interface IntentMetricsService {
26 /**
27 * Gets the last saved intent events.
28 *
Pavlin Radoslavov166c5472015-03-18 11:47:50 -070029 * @return the last saved intent events
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070030 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070031 List<IntentEvent> getEvents();
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070032
33 /**
Brian O'Connor7a71d5d2014-12-02 00:12:27 -080034 * Gets the Event Metric for the intent INSTALL_REQ events.
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070035 *
Pavlin Radoslavov166c5472015-03-18 11:47:50 -070036 * @return the Event Metric for the intent INSTALL_REQ events
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070037 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070038 EventMetric intentSubmittedEventMetric();
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070039
40 /**
Pavlin Radoslavovccc2e332014-10-23 13:46:28 -070041 * Gets the Event Metric for the intent INSTALLED events.
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070042 *
Pavlin Radoslavov166c5472015-03-18 11:47:50 -070043 * @return the Event Metric for the intent INSTALLED events
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070044 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070045 EventMetric intentInstalledEventMetric();
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070046
47 /**
Pavlin Radoslavov0f8a1e42015-01-13 11:52:52 -080048 * Gets the Event Metric for the intent FAILED events.
49 *
Pavlin Radoslavov166c5472015-03-18 11:47:50 -070050 * @return the Event Metric for the intent FAILED events
Pavlin Radoslavov0f8a1e42015-01-13 11:52:52 -080051 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070052 EventMetric intentFailedEventMetric();
Pavlin Radoslavov0f8a1e42015-01-13 11:52:52 -080053
54 /**
Pavlin Radoslavov4749f842014-12-02 13:11:22 -080055 * Gets the Event Metric for the intent WITHDRAW_REQ events.
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070056 *
Pavlin Radoslavov166c5472015-03-18 11:47:50 -070057 * @return the Event Metric for the intent WITHDRAW_REQ events
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070058 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070059 EventMetric intentWithdrawRequestedEventMetric();
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070060
61 /**
Pavlin Radoslavovccc2e332014-10-23 13:46:28 -070062 * Gets the Event Metric for the intent WITHDRAWN events.
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070063 *
Pavlin Radoslavov166c5472015-03-18 11:47:50 -070064 * @return the Event Metric for the intent WITHDRAWN events
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070065 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070066 EventMetric intentWithdrawnEventMetric();
Pavlin Radoslavov166c5472015-03-18 11:47:50 -070067
68 /**
69 * Gets the Event Metric for the intent PURGED events.
70 *
71 * @return the Event Metric for the intent PURGED events
72 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070073 EventMetric intentPurgedEventMetric();
Pavlin Radoslavov295b2962014-10-23 01:12:41 -070074}