blob: e1c9b57207ce2584da162abe9c36fc2214ed1726 [file] [log] [blame]
alshabib7bb05012015-08-05 10:15:09 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
alshabib7bb05012015-08-05 10:15:09 -07003 *
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 */
alshabib10c810b2015-08-18 16:59:04 -070016package org.onosproject.net.meter;
alshabib7bb05012015-08-05 10:15:09 -070017
18/**
19 * Represents a stored meter.
20 */
21public 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}