blob: b3a65647b116391cbe694609c58e5c3df7c184df [file] [log] [blame]
Thomas Vachuska83e090e2014-10-22 14:25:35 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2014-present Open Networking Laboratory
Thomas Vachuska83e090e2014-10-22 14:25:35 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * 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
Thomas Vachuska83e090e2014-10-22 14:25:35 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * 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.
Thomas Vachuska83e090e2014-10-22 14:25:35 -070015 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.flow;
Yuta HIGUCHIf6f50a62014-10-19 15:58:49 -070017
18
Thiago Santos877914d2016-07-20 18:29:29 -030019import java.util.concurrent.TimeUnit;
20
Yuta HIGUCHIf6f50a62014-10-19 15:58:49 -070021public interface StoredFlowEntry extends FlowEntry {
22
23 /**
24 * Sets the last active epoch time.
25 */
26 void setLastSeen();
27
28 /**
29 * Sets the new state for this entry.
30 * @param newState new flow entry state.
31 */
32 void setState(FlowEntryState newState);
33
34 /**
35 * Sets how long this entry has been entered in the system.
Thiago Santos877914d2016-07-20 18:29:29 -030036 * @param lifeSecs seconds
Yuta HIGUCHIf6f50a62014-10-19 15:58:49 -070037 */
Thiago Santos877914d2016-07-20 18:29:29 -030038 void setLife(long lifeSecs);
39
40 /**
41 * Sets how long this entry has been entered in the system.
42 * @param life time
43 * @param timeUnit unit of time
44 */
45 void setLife(long life, TimeUnit timeUnit);
Yuta HIGUCHIf6f50a62014-10-19 15:58:49 -070046
47 /**
48 * Number of packets seen by this entry.
49 * @param packets a long value
50 */
51 void setPackets(long packets);
52
53 /**
54 * Number of bytes seen by this rule.
55 * @param bytes a long value
56 */
57 void setBytes(long bytes);
58
59}