public class DefaultFlowEntry extends DefaultFlowRule implements StoredFlowEntry
DefaultFlowRule.BuilderFlowEntry.FlowEntryStateFlowRule.Builder, FlowRule.FlowRemoveReasonMAX_PRIORITY, MAX_TIMEOUT, MIN_PRIORITY| Constructor and Description |
|---|
DefaultFlowEntry(FlowRule rule) |
DefaultFlowEntry(FlowRule rule,
FlowEntry.FlowEntryState state,
long lifeSecs,
long packets,
long bytes) |
DefaultFlowEntry(FlowRule rule,
FlowEntry.FlowEntryState state,
long life,
TimeUnit lifeTimeUnit,
long packets,
long bytes) |
DefaultFlowEntry(FlowRule rule,
int errType,
int errCode) |
| 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(TimeUnit timeUnit)
Returns the time this flow rule has been applied.
|
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,
TimeUnit timeUnit)
Sets how long this entry has been entered in the system.
|
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.
|
String |
toString() |
appId, builder, created, deviceId, equals, exactMatch, groupId, hardTimeout, hashCode, id, isPermanent, payLoad, priority, reason, selector, tableId, timeout, treatmentpublic DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long life, TimeUnit lifeTimeUnit, long packets, long bytes)
public DefaultFlowEntry(FlowRule rule, FlowEntry.FlowEntryState state, long lifeSecs, long packets, long bytes)
public DefaultFlowEntry(FlowRule rule)
public DefaultFlowEntry(FlowRule rule, int errType, int errCode)
public long life()
FlowEntrypublic long life(TimeUnit timeUnit)
FlowEntrypublic long packets()
FlowEntrypublic long bytes()
FlowEntrypublic FlowEntry.FlowEntryState state()
FlowEntrypublic long lastSeen()
FlowEntrypublic void setLastSeen()
StoredFlowEntrysetLastSeen in interface StoredFlowEntrypublic void setState(FlowEntry.FlowEntryState newState)
StoredFlowEntrysetState in interface StoredFlowEntrynewState - new flow entry state.public void setLife(long life)
StoredFlowEntrysetLife in interface StoredFlowEntrylife - secondspublic void setLife(long life,
TimeUnit timeUnit)
StoredFlowEntrysetLife in interface StoredFlowEntrylife - timetimeUnit - unit of timepublic void setPackets(long packets)
StoredFlowEntrysetPackets in interface StoredFlowEntrypackets - a long valuepublic void setBytes(long bytes)
StoredFlowEntrysetBytes in interface StoredFlowEntrybytes - a long valuepublic int errType()
FlowEntrypublic int errCode()
FlowEntrypublic String toString()
toString in class DefaultFlowRule