blob: 00ca270c656b358a1b5bb60a015e7a41ba553b0b [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 token bucket.
23 */
24@Beta
25public interface TokenBucketEntry {
26
27 /**
28 * Updates the number of packets seen by this token bucket.
29 *
30 * @param packets a packet count.
31 */
32 void setProcessedPackets(long packets);
33
34 /**
35 * Updates the number of bytes seen by this token bucket.
36 *
37 * @param bytes a byte counter.
38 */
39 void setProcessedBytes(long bytes);
40
41}