alshabib | 7bb0501 | 2015-08-05 10:15:09 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Open Networking Laboratory |
| 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 | 7bb0501 | 2015-08-05 10:15:09 -0700 | [diff] [blame] | 17 | |
| 18 | /** |
| 19 | * Represents a stored meter. |
| 20 | */ |
| 21 | public interface MeterEntry extends Meter { |
| 22 | |
| 23 | /** |
| 24 | * Updates the state of this meter. |
| 25 | * |
| 26 | * @param state a meter state |
| 27 | */ |
| 28 | void setState(MeterState state); |
| 29 | |
| 30 | /** |
| 31 | * Set the amount of time the meter has existed in seconds. |
| 32 | * |
| 33 | * @param life number of seconds |
| 34 | */ |
| 35 | void setLife(long life); |
| 36 | |
| 37 | /** |
| 38 | * Sets the number of flows which are using this meter. |
| 39 | * |
| 40 | * @param count a reference count. |
| 41 | */ |
| 42 | void setReferenceCount(long count); |
| 43 | |
| 44 | /** |
| 45 | * Updates the number of packets seen by this meter. |
| 46 | * |
| 47 | * @param packets a packet count. |
| 48 | */ |
| 49 | void setProcessedPackets(long packets); |
| 50 | |
| 51 | /** |
| 52 | * Updates the number of bytes seen by the meter. |
| 53 | * |
| 54 | * @param bytes a byte counter. |
| 55 | */ |
| 56 | void setProcessedBytes(long bytes); |
| 57 | } |