alshabib | e27055b | 2015-07-09 21:43:10 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
alshabib | e27055b | 2015-07-09 21:43:10 -0700 | [diff] [blame] | 3 | * |
| 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 |
| 7 | * |
| 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. |
| 15 | */ |
alshabib | 10c810b | 2015-08-18 16:59:04 -0700 | [diff] [blame] | 16 | package org.onosproject.net.meter; |
alshabib | e27055b | 2015-07-09 21:43:10 -0700 | [diff] [blame] | 17 | |
alshabib | bc37196 | 2015-07-09 22:26:21 -0700 | [diff] [blame] | 18 | import org.onosproject.net.DeviceId; |
alshabib | e27055b | 2015-07-09 21:43:10 -0700 | [diff] [blame] | 19 | import org.onosproject.net.provider.Provider; |
| 20 | |
| 21 | /** |
| 22 | * Abstraction of a Meter provider. |
| 23 | */ |
| 24 | public interface MeterProvider extends Provider { |
Charles Chan | a59f9b76 | 2017-07-30 18:09:44 -0700 | [diff] [blame] | 25 | /** |
| 26 | * Meter capable property name. |
| 27 | * A driver is assumed to be meter capable if this property is undefined. |
| 28 | */ |
| 29 | String METER_CAPABLE = "meterCapable"; |
alshabib | bc37196 | 2015-07-09 22:26:21 -0700 | [diff] [blame] | 30 | |
| 31 | /** |
| 32 | * Performs a batch of meter operation on the specified device with the |
| 33 | * specified parameters. |
| 34 | * |
| 35 | * @param deviceId device identifier on which the batch of group |
| 36 | * operations to be executed |
| 37 | * @param meterOps immutable list of meter operation |
| 38 | */ |
| 39 | void performMeterOperation(DeviceId deviceId, |
| 40 | MeterOperations meterOps); |
| 41 | |
| 42 | |
| 43 | /** |
| 44 | * Performs a meter operation on the specified device with the |
| 45 | * specified parameters. |
| 46 | * |
| 47 | * @param deviceId device identifier on which the batch of group |
| 48 | * operations to be executed |
| 49 | * @param meterOp a meter operation |
| 50 | */ |
| 51 | void performMeterOperation(DeviceId deviceId, |
| 52 | MeterOperation meterOp); |
alshabib | e27055b | 2015-07-09 21:43:10 -0700 | [diff] [blame] | 53 | } |