blob: 8b8554aeef127e46f977ff1921eeea35a137eb0a [file] [log] [blame]
Madan Jampanic27b6b22016-02-05 11:36:31 -08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Madan Jampanic27b6b22016-02-05 11:36:31 -08003 *
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.flow;
18
19/**
20 * Represents a flow live type for a given flow entry.
21 */
22public interface TypedStoredFlowEntry extends StoredFlowEntry {
23 enum FlowLiveType {
24 /**
25 * Indicates that this rule has been submitted for addition immediately.
26 * Not necessarily collecting flow stats.
27 */
28 IMMEDIATE_FLOW,
29
30 /**
31 * Indicates that this rule has been submitted for a short time.
32 * Necessarily collecting flow stats every calAndPollInterval.
33 */
34 SHORT_FLOW,
35
36 /**
37 * Indicates that this rule has been submitted for a mid time.
38 * Necessarily collecting flow stats every midPollInterval.
39 */
40 MID_FLOW,
41
42 /**
43 * Indicates that this rule has been submitted for a long time.
44 * Necessarily collecting flow stats every longPollInterval.
45 */
46 LONG_FLOW,
47
48 /**
49 * Indicates that this rule has been submitted for UNKNOWN or ERROR.
50 * Not necessarily collecting flow stats.
51 */
52 UNKNOWN_FLOW
53 }
54
55 /**
56 * Gets the flow live type for this entry.
57 *
58 * @return flow live type
59 */
Sangsik Yoonb1b823f2016-05-16 18:55:39 +090060 TypedStoredFlowEntry.FlowLiveType flowLiveType();
Madan Jampanic27b6b22016-02-05 11:36:31 -080061
62 /**
63 * Sets the new flow live type for this entry.
64 * @param liveType new flow live type.
65 */
Sangsik Yoonb1b823f2016-05-16 18:55:39 +090066 void setFlowLiveType(TypedStoredFlowEntry.FlowLiveType liveType);
Madan Jampanic27b6b22016-02-05 11:36:31 -080067}