Package org.onosproject.net.flow
Class DefaultFlowEntry
- java.lang.Object
- 
- org.onosproject.net.flow.DefaultFlowRule
- 
- org.onosproject.net.flow.DefaultFlowEntry
 
 
- 
- All Implemented Interfaces:
- FlowEntry,- FlowRule,- StoredFlowEntry,- PiTranslatable
 - Direct Known Subclasses:
- DefaultTypedFlowEntry
 
 public class DefaultFlowEntry extends DefaultFlowRule implements StoredFlowEntry 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.onosproject.net.flow.DefaultFlowRuleDefaultFlowRule.Builder
 - 
Nested classes/interfaces inherited from interface org.onosproject.net.flow.FlowEntryFlowEntry.FlowEntryState, FlowEntry.FlowLiveType
 - 
Nested classes/interfaces inherited from interface org.onosproject.net.flow.FlowRuleFlowRule.Builder, FlowRule.FlowRemoveReason
 
- 
 - 
Field Summary- 
Fields inherited from interface org.onosproject.net.flow.FlowRuleDEFAULT_TABLE, MAX_PRIORITY, MAX_TIMEOUT, MIN_PRIORITY
 
- 
 - 
Constructor SummaryConstructors Constructor Description DefaultFlowEntry(FlowRule rule)DefaultFlowEntry(FlowRule rule, int errType, int errCode)Creates a flow entry of flow table specified with the flow rule, state, live type and statistic information.DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state)Creates a flow entry based on specified flow rule and state.DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long lifeSecs, long packets, long bytes)DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long life, java.util.concurrent.TimeUnit lifeTimeUnit, long packets, long bytes)Creates a flow entry of flow table specified with the flow rule, state and statistic information.DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long life, java.util.concurrent.TimeUnit lifeTimeUnit, FlowEntry.FlowLiveType liveType, long packets, long bytes)Creates a flow entry of flow table specified with the flow rule, state and statistic information.DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long lifeSecs, FlowEntry.FlowLiveType liveType, long packets, long bytes)Creates a flow entry of flow table specified with the flow rule, state, live type and statistic information.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description longbytes()Returns the number of bytes this flow rule has matched.interrCode()Indicates the error code.interrType()Indicates the error type.longlastSeen()When this flow entry was last deemed active.longlife()Returns the number of seconds this flow rule has been applied.longlife(java.util.concurrent.TimeUnit timeUnit)Returns the time this flow rule has been applied.FlowEntry.FlowLiveTypeliveType()Gets the flow live type for this entry.longpackets()Returns the number of packets this flow rule has matched.voidsetBytes(long bytes)Number of bytes seen by this rule.voidsetLastSeen()Sets the last active epoch time.voidsetLife(long life)Sets how long this entry has been entered in the system.voidsetLife(long life, java.util.concurrent.TimeUnit timeUnit)Sets how long this entry has been entered in the system.voidsetLiveType(FlowEntry.FlowLiveType liveType)Sets the flow live type, i.e., IMMEDIATE, SHORT, MID, LONG.voidsetPackets(long packets)Number of packets seen by this entry.voidsetState(FlowEntry.FlowEntryState newState)Sets the new state for this entry.FlowEntry.FlowEntryStatestate()Returns the flow entry state.java.lang.StringtoString()- 
Methods inherited from class org.onosproject.net.flow.DefaultFlowRuleappId, builder, created, deviceId, equals, exactMatch, groupId, hardTimeout, hashCode, id, isPermanent, priority, reason, selector, table, tableId, timeout, treatment
 
- 
 
- 
- 
- 
Constructor Detail- 
DefaultFlowEntrypublic DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long life, java.util.concurrent.TimeUnit lifeTimeUnit, long packets, long bytes) Creates a flow entry of flow table specified with the flow rule, state and statistic information.- Parameters:
- rule- the flow rule
- state- the flow state
- life- the duration second of flow
- lifeTimeUnit- life time unit
- packets- the number of packets of this flow
- bytes- the the number of bytes of this flow
 
 - 
DefaultFlowEntrypublic DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long life, java.util.concurrent.TimeUnit lifeTimeUnit, FlowEntry.FlowLiveType liveType, long packets, long bytes) Creates a flow entry of flow table specified with the flow rule, state and statistic information.- Parameters:
- rule- the flow rule
- state- the flow state
- life- the duration second of flow
- lifeTimeUnit- life time unit
- liveType- the flow live type, i.e., IMMEDIATE, SHORT, MID, LONG
- packets- the number of packets of this flow
- bytes- the the number of bytes of this flow
 
 - 
DefaultFlowEntrypublic DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long lifeSecs, FlowEntry.FlowLiveType liveType, long packets, long bytes) Creates a flow entry of flow table specified with the flow rule, state, live type and statistic information.- Parameters:
- rule- the flow rule
- state- the flow state
- lifeSecs- the duration second of flow
- liveType- the flow live type, i.e., IMMEDIATE, SHORT, MID, LONG
- packets- the number of packets of this flow
- bytes- the the number of bytes of this flow
 
 - 
DefaultFlowEntrypublic DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long lifeSecs, long packets, long bytes) 
 - 
DefaultFlowEntrypublic DefaultFlowEntry(FlowRule rule) 
 - 
DefaultFlowEntrypublic DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state) Creates a flow entry based on specified flow rule and state.- Parameters:
- rule- to use as base
- state- of the flow entry
 
 - 
DefaultFlowEntrypublic DefaultFlowEntry(FlowRule rule, int errType, int errCode) Creates a flow entry of flow table specified with the flow rule, state, live type and statistic information.- Parameters:
- rule- the flow rule
- errType- the error type
- errCode- the error code
 
 
- 
 - 
Method Detail- 
lifepublic long life() Description copied from interface:FlowEntryReturns the number of seconds this flow rule has been applied.
 - 
lifepublic long life(java.util.concurrent.TimeUnit timeUnit) Description copied from interface:FlowEntryReturns the time this flow rule has been applied.
 - 
liveTypepublic FlowEntry.FlowLiveType liveType() Description copied from interface:FlowEntryGets the flow live type for this entry.
 - 
packetspublic long packets() Description copied from interface:FlowEntryReturns the number of packets this flow rule has matched.
 - 
bytespublic long bytes() Description copied from interface:FlowEntryReturns the number of bytes this flow rule has matched.
 - 
statepublic FlowEntry.FlowEntryState state() Description copied from interface:FlowEntryReturns the flow entry state.
 - 
lastSeenpublic long lastSeen() Description copied from interface:FlowEntryWhen this flow entry was last deemed active.
 - 
setLastSeenpublic void setLastSeen() Description copied from interface:StoredFlowEntrySets the last active epoch time.- Specified by:
- setLastSeenin interface- StoredFlowEntry
 
 - 
setStatepublic void setState(FlowEntry.FlowEntryState newState) Description copied from interface:StoredFlowEntrySets the new state for this entry.- Specified by:
- setStatein interface- StoredFlowEntry
- Parameters:
- newState- new flow entry state.
 
 - 
setLifepublic void setLife(long life) Description copied from interface:StoredFlowEntrySets how long this entry has been entered in the system.- Specified by:
- setLifein interface- StoredFlowEntry
- Parameters:
- life- seconds
 
 - 
setLifepublic void setLife(long life, java.util.concurrent.TimeUnit timeUnit)Description copied from interface:StoredFlowEntrySets how long this entry has been entered in the system.- Specified by:
- setLifein interface- StoredFlowEntry
- Parameters:
- life- time
- timeUnit- unit of time
 
 - 
setLiveTypepublic void setLiveType(FlowEntry.FlowLiveType liveType) Description copied from interface:StoredFlowEntrySets the flow live type, i.e., IMMEDIATE, SHORT, MID, LONG.- Specified by:
- setLiveTypein interface- StoredFlowEntry
- Parameters:
- liveType- flow live type
 
 - 
setPacketspublic void setPackets(long packets) Description copied from interface:StoredFlowEntryNumber of packets seen by this entry.- Specified by:
- setPacketsin interface- StoredFlowEntry
- Parameters:
- packets- a long value
 
 - 
setBytespublic void setBytes(long bytes) Description copied from interface:StoredFlowEntryNumber of bytes seen by this rule.- Specified by:
- setBytesin interface- StoredFlowEntry
- Parameters:
- bytes- a long value
 
 - 
errTypepublic int errType() Description copied from interface:FlowEntryIndicates the error type.
 - 
errCodepublic int errCode() Description copied from interface:FlowEntryIndicates the error code.
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- DefaultFlowRule
 
 
- 
 
-