Thomas Vachuska | 83e090e | 2014-10-22 14:25:35 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2014-present Open Networking Foundation |
Thomas Vachuska | 83e090e | 2014-10-22 14:25:35 -0700 | [diff] [blame] | 3 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 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 |
Thomas Vachuska | 83e090e | 2014-10-22 14:25:35 -0700 | [diff] [blame] | 7 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 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. |
Thomas Vachuska | 83e090e | 2014-10-22 14:25:35 -0700 | [diff] [blame] | 15 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.net.flow; |
Yuta HIGUCHI | f6f50a6 | 2014-10-19 15:58:49 -0700 | [diff] [blame] | 17 | |
| 18 | |
Thiago Santos | 877914d | 2016-07-20 18:29:29 -0300 | [diff] [blame] | 19 | import java.util.concurrent.TimeUnit; |
| 20 | |
Yuta HIGUCHI | f6f50a6 | 2014-10-19 15:58:49 -0700 | [diff] [blame] | 21 | public 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 Santos | 877914d | 2016-07-20 18:29:29 -0300 | [diff] [blame] | 36 | * @param lifeSecs seconds |
Yuta HIGUCHI | f6f50a6 | 2014-10-19 15:58:49 -0700 | [diff] [blame] | 37 | */ |
Thiago Santos | 877914d | 2016-07-20 18:29:29 -0300 | [diff] [blame] | 38 | 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 HIGUCHI | f6f50a6 | 2014-10-19 15:58:49 -0700 | [diff] [blame] | 46 | |
| 47 | /** |
Sangsik Yoon | b1b823f | 2016-05-16 18:55:39 +0900 | [diff] [blame] | 48 | * Sets the flow live type, |
| 49 | * i.e., IMMEDIATE, SHORT, MID, LONG. |
| 50 | * @param liveType flow live type |
| 51 | */ |
| 52 | void setLiveType(FlowLiveType liveType); |
| 53 | |
| 54 | /** |
Yuta HIGUCHI | f6f50a6 | 2014-10-19 15:58:49 -0700 | [diff] [blame] | 55 | * Number of packets seen by this entry. |
| 56 | * @param packets a long value |
| 57 | */ |
| 58 | void setPackets(long packets); |
| 59 | |
| 60 | /** |
| 61 | * Number of bytes seen by this rule. |
| 62 | * @param bytes a long value |
| 63 | */ |
| 64 | void setBytes(long bytes); |
| 65 | |
| 66 | } |