blob: 0f019efd671ee9425cdcadeceac159b9689b7861 [file] [log] [blame]
Pier Luigi09220c22017-09-14 22:00:30 +02001/*
2 * Copyright 2017-present Open Networking Foundation
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 */
16
17package org.onosproject.net.behaviour.trafficcontrol;
18
19import com.google.common.annotations.Beta;
20
21/**
22 * Represents a stored policer.
23 */
24@Beta
25public interface PolicerEntry {
26
27 /**
28 * Set the amount of time the policer has existed in seconds.
29 *
30 * @param life number of seconds
31 */
32 void setLife(long life);
33
34 /**
35 * Sets how many are using this policer.
36 *
37 * @param count a reference count.
38 */
39 void setReferenceCount(long count);
40
41 /**
42 * Updates the number of packets seen by this policer.
43 *
44 * @param packets a packet count.
45 */
46 void setProcessedPackets(long packets);
47
48 /**
49 * Updates the number of bytes seen by the policer.
50 *
51 * @param bytes a byte counter.
52 */
53 void setProcessedBytes(long bytes);
54
55}