Package org.onosproject.net.flow
Class DefaultTypedFlowEntry
- java.lang.Object
-
- org.onosproject.net.flow.DefaultFlowRule
-
- org.onosproject.net.flow.DefaultFlowEntry
-
- org.onosproject.net.flow.DefaultTypedFlowEntry
-
- All Implemented Interfaces:
FlowEntry,FlowRule,StoredFlowEntry,TypedStoredFlowEntry,PiTranslatable
public class DefaultTypedFlowEntry extends DefaultFlowEntry implements TypedStoredFlowEntry
Default flow entry class with FlowLiveType value, IMMEDIATE_FLOW, SHORT_FLOW, MID_FLOW, LONG_FLOW.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.onosproject.net.flow.DefaultFlowRule
DefaultFlowRule.Builder
-
Nested classes/interfaces inherited from interface org.onosproject.net.flow.FlowEntry
FlowEntry.FlowEntryState, FlowEntry.FlowLiveType
-
Nested classes/interfaces inherited from interface org.onosproject.net.flow.FlowRule
FlowRule.Builder, FlowRule.FlowRemoveReason
-
Nested classes/interfaces inherited from interface org.onosproject.net.flow.TypedStoredFlowEntry
TypedStoredFlowEntry.FlowLiveType
-
-
Field Summary
-
Fields inherited from interface org.onosproject.net.flow.FlowRule
DEFAULT_TABLE, MAX_PRIORITY, MAX_TIMEOUT, MIN_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description DefaultTypedFlowEntry(FlowEntry fe)Creates a typed flow entry from flow entry, with default flow live type(IMMEDIATE_FLOW).DefaultTypedFlowEntry(FlowEntry fe, TypedStoredFlowEntry.FlowLiveType liveType)Creates a typed flow entry from flow entry and flow live type.DefaultTypedFlowEntry(FlowRule rule)Creates a typed flow entry from flow rule, with default flow live type(IMMEDIATE_FLOW).DefaultTypedFlowEntry(FlowRule rule, int errType, int errCode, TypedStoredFlowEntry.FlowLiveType liveType)Creates a typed flow entry from flow rule, error code and flow live type.DefaultTypedFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long life, long packets, long bytes)Creates a typed flow entry from flow rule and its statistics, with default flow live type(IMMEDIATE_FLOW).DefaultTypedFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long life, TimeUnit lifeTimeUnit, long packets, long bytes)Creates a typed flow entry from flow rule and its statistics, with default flow live type(IMMEDIATE_FLOW).DefaultTypedFlowEntry(FlowRule rule, TypedStoredFlowEntry.FlowLiveType liveType)Creates a typed flow entry from flow rule and flow live type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypedStoredFlowEntry.FlowLiveTypeflowLiveType()Gets the flow live type for this entry.voidsetFlowLiveType(TypedStoredFlowEntry.FlowLiveType liveType)Sets the new flow live type for this entry.StringtoString()-
Methods inherited from class org.onosproject.net.flow.DefaultFlowEntry
bytes, errCode, errType, lastSeen, life, life, liveType, packets, setBytes, setLastSeen, setLife, setLife, setLiveType, setPackets, setState, state
-
Methods inherited from class org.onosproject.net.flow.DefaultFlowRule
appId, builder, created, deviceId, equals, exactMatch, groupId, hardTimeout, hashCode, id, isPermanent, priority, reason, selector, table, tableId, timeout, treatment
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.onosproject.net.flow.FlowEntry
bytes, errCode, errType, lastSeen, life, life, liveType, packets, state
-
Methods inherited from interface org.onosproject.net.flow.FlowRule
appId, deviceId, equals, exactMatch, groupId, hardTimeout, id, isPermanent, priority, reason, selector, table, tableId, timeout, treatment
-
Methods inherited from interface org.onosproject.net.flow.StoredFlowEntry
setBytes, setLastSeen, setLife, setLife, setLiveType, setPackets, setState
-
-
-
-
Constructor Detail
-
DefaultTypedFlowEntry
public DefaultTypedFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long life, TimeUnit lifeTimeUnit, long packets, long bytes)
Creates a typed flow entry from flow rule and its statistics, with default flow live type(IMMEDIATE_FLOW).- Parameters:
rule- the flow rulestate- the flow statelife- the flow duration since creationlifeTimeUnit- the time unit of lifepackets- the flow packets countbytes- the flow bytes count
-
DefaultTypedFlowEntry
public DefaultTypedFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long life, long packets, long bytes)
Creates a typed flow entry from flow rule and its statistics, with default flow live type(IMMEDIATE_FLOW).- Parameters:
rule- the flow rulestate- the flow statelife- the flow duration since creationpackets- the flow packets countbytes- the flow bytes count
-
DefaultTypedFlowEntry
public DefaultTypedFlowEntry(FlowRule rule)
Creates a typed flow entry from flow rule, with default flow live type(IMMEDIATE_FLOW).- Parameters:
rule- the flow rule
-
DefaultTypedFlowEntry
public DefaultTypedFlowEntry(FlowEntry fe)
Creates a typed flow entry from flow entry, with default flow live type(IMMEDIATE_FLOW).- Parameters:
fe- the flow entry
-
DefaultTypedFlowEntry
public DefaultTypedFlowEntry(FlowRule rule, TypedStoredFlowEntry.FlowLiveType liveType)
Creates a typed flow entry from flow rule and flow live type.- Parameters:
rule- the flow ruleliveType- the flow live type
-
DefaultTypedFlowEntry
public DefaultTypedFlowEntry(FlowEntry fe, TypedStoredFlowEntry.FlowLiveType liveType)
Creates a typed flow entry from flow entry and flow live type.- Parameters:
fe- the flow ruleliveType- the flow live type
-
DefaultTypedFlowEntry
public DefaultTypedFlowEntry(FlowRule rule, int errType, int errCode, TypedStoredFlowEntry.FlowLiveType liveType)
Creates a typed flow entry from flow rule, error code and flow live type.- Parameters:
rule- the flow ruleerrType- the flow error typeerrCode- the flow error codeliveType- the flow live type
-
-
Method Detail
-
flowLiveType
public TypedStoredFlowEntry.FlowLiveType flowLiveType()
Description copied from interface:TypedStoredFlowEntryGets the flow live type for this entry.- Specified by:
flowLiveTypein interfaceTypedStoredFlowEntry- Returns:
- flow live type
-
setFlowLiveType
public void setFlowLiveType(TypedStoredFlowEntry.FlowLiveType liveType)
Description copied from interface:TypedStoredFlowEntrySets the new flow live type for this entry.- Specified by:
setFlowLiveTypein interfaceTypedStoredFlowEntry- Parameters:
liveType- new flow live type.
-
toString
public String toString()
- Overrides:
toStringin classDefaultFlowEntry
-
-