public class DefaultFlowEntry extends DefaultFlowRule implements StoredFlowEntry
DefaultFlowRule.Builder
FlowEntry.FlowEntryState, FlowEntry.FlowLiveType
FlowRule.Builder, FlowRule.FlowRemoveReason
DEFAULT_TABLE, MAX_PRIORITY, MAX_TIMEOUT, MIN_PRIORITY
Constructor and Description |
---|
DefaultFlowEntry(FlowRule rule) |
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,
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.
|
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,
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 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,
int errType,
int errCode)
Creates a flow entry of flow table specified with the flow rule, state,
live type and statistic information.
|
Modifier and Type | Method and Description |
---|---|
long |
bytes()
Returns the number of bytes this flow rule has matched.
|
int |
errCode()
Indicates the error code.
|
int |
errType()
Indicates the error type.
|
long |
lastSeen()
When this flow entry was last deemed active.
|
long |
life()
Returns the number of seconds this flow rule has been applied.
|
long |
life(java.util.concurrent.TimeUnit timeUnit)
Returns the time this flow rule has been applied.
|
FlowEntry.FlowLiveType |
liveType()
Gets the flow live type for this entry.
|
long |
packets()
Returns the number of packets this flow rule has matched.
|
void |
setBytes(long bytes)
Number of bytes seen by this rule.
|
void |
setLastSeen()
Sets the last active epoch time.
|
void |
setLife(long life)
Sets how long this entry has been entered in the system.
|
void |
setLife(long life,
java.util.concurrent.TimeUnit timeUnit)
Sets how long this entry has been entered in the system.
|
void |
setLiveType(FlowEntry.FlowLiveType liveType)
Sets the flow live type,
i.e., IMMEDIATE, SHORT, MID, LONG.
|
void |
setPackets(long packets)
Number of packets seen by this entry.
|
void |
setState(FlowEntry.FlowEntryState newState)
Sets the new state for this entry.
|
FlowEntry.FlowEntryState |
state()
Returns the flow entry state.
|
java.lang.String |
toString() |
appId, builder, created, deviceId, equals, exactMatch, groupId, hardTimeout, hashCode, id, isPermanent, payLoad, priority, reason, selector, table, tableId, timeout, treatment
public DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long life, java.util.concurrent.TimeUnit lifeTimeUnit, long packets, long bytes)
rule
- the flow rulestate
- the flow statelife
- the duration second of flowlifeTimeUnit
- life time unitpackets
- the number of packets of this flowbytes
- the the number of bytes of this flowpublic DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long life, java.util.concurrent.TimeUnit lifeTimeUnit, FlowEntry.FlowLiveType liveType, long packets, long bytes)
rule
- the flow rulestate
- the flow statelife
- the duration second of flowlifeTimeUnit
- life time unitliveType
- the flow live type, i.e., IMMEDIATE, SHORT, MID, LONGpackets
- the number of packets of this flowbytes
- the the number of bytes of this flowpublic DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long lifeSecs, FlowEntry.FlowLiveType liveType, long packets, long bytes)
rule
- the flow rulestate
- the flow statelifeSecs
- the duration second of flowliveType
- the flow live type, i.e., IMMEDIATE, SHORT, MID, LONGpackets
- the number of packets of this flowbytes
- the the number of bytes of this flowpublic DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long lifeSecs, long packets, long bytes)
public DefaultFlowEntry(FlowRule rule)
public DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state)
rule
- to use as basestate
- of the flow entrypublic DefaultFlowEntry(FlowRule rule, int errType, int errCode)
rule
- the flow ruleerrType
- the error typeerrCode
- the error codepublic long life()
FlowEntry
public long life(java.util.concurrent.TimeUnit timeUnit)
FlowEntry
public FlowEntry.FlowLiveType liveType()
FlowEntry
public long packets()
FlowEntry
public long bytes()
FlowEntry
public FlowEntry.FlowEntryState state()
FlowEntry
public long lastSeen()
FlowEntry
public void setLastSeen()
StoredFlowEntry
setLastSeen
in interface StoredFlowEntry
public void setState(FlowEntry.FlowEntryState newState)
StoredFlowEntry
setState
in interface StoredFlowEntry
newState
- new flow entry state.public void setLife(long life)
StoredFlowEntry
setLife
in interface StoredFlowEntry
life
- secondspublic void setLife(long life, java.util.concurrent.TimeUnit timeUnit)
StoredFlowEntry
setLife
in interface StoredFlowEntry
life
- timetimeUnit
- unit of timepublic void setLiveType(FlowEntry.FlowLiveType liveType)
StoredFlowEntry
setLiveType
in interface StoredFlowEntry
liveType
- flow live typepublic void setPackets(long packets)
StoredFlowEntry
setPackets
in interface StoredFlowEntry
packets
- a long valuepublic void setBytes(long bytes)
StoredFlowEntry
setBytes
in interface StoredFlowEntry
bytes
- a long valuepublic int errType()
FlowEntry
public int errCode()
FlowEntry
public java.lang.String toString()
toString
in class DefaultFlowRule