public class DefaultFlowRule extends java.lang.Object implements FlowRule
Modifier and Type | Class and Description |
---|---|
static class |
DefaultFlowRule.Builder
Default flow rule builder.
|
FlowRule.FlowRemoveReason
DEFAULT_TABLE, MAX_PRIORITY, MAX_TIMEOUT, MIN_PRIORITY
Constructor and Description |
---|
DefaultFlowRule(DeviceId deviceId,
TrafficSelector selector,
TrafficTreatment treatment,
int priority,
ApplicationId appId,
GroupId groupId,
int timeout,
boolean permanent,
FlowRuleExtPayLoad payLoad)
Deprecated.
in Junco release. Use FlowRule.Builder instead.
|
DefaultFlowRule(DeviceId deviceId,
TrafficSelector selector,
TrafficTreatment treatment,
int priority,
ApplicationId appId,
GroupId groupId,
int timeout,
int hardTimeout,
boolean permanent,
FlowRuleExtPayLoad payLoad)
Deprecated.
in Junco release. Use FlowRule.Builder instead.
|
DefaultFlowRule(DeviceId deviceId,
TrafficSelector selector,
TrafficTreatment treatment,
int priority,
ApplicationId appId,
int timeout,
boolean permanent,
FlowRuleExtPayLoad payLoad)
Deprecated.
in Junco release. Use FlowRule.Builder instead.
|
DefaultFlowRule(DeviceId deviceId,
TrafficSelector selector,
TrafficTreatment treatment,
int priority,
ApplicationId appId,
int timeout,
int hardTimeout,
boolean permanent,
FlowRuleExtPayLoad payLoad)
Deprecated.
in Junco release. Use FlowRule.Builder instead.
|
DefaultFlowRule(FlowRule rule)
Creates a new flow rule from an existing rule.
|
Modifier and Type | Method and Description |
---|---|
short |
appId()
Returns the application id of this flow.
|
static DefaultFlowRule.Builder |
builder()
Returns a default flow rule builder.
|
long |
created()
Returns the wallclock time that the flow was created.
|
DeviceId |
deviceId()
Returns the identity of the device where this rule applies.
|
boolean |
equals(java.lang.Object obj)
Equality for flow rules only considers 'match equality'.
|
boolean |
exactMatch(FlowRule rule)
Returns whether this flow rule is an exact match to the flow rule given
in the argument.
|
GroupId |
groupId()
Returns the group id of this flow.
|
int |
hardTimeout()
Returns the hard timeout for this flow requested by an application.
|
int |
hashCode() |
FlowId |
id()
Returns the ID of this flow.
|
boolean |
isPermanent()
Returns whether the flow is permanent i.e.
|
FlowRuleExtPayLoad |
payLoad()
Returns the third party original flow rule.
|
int |
priority()
Returns the flow rule priority given in natural order; higher numbers
mean higher priorities.
|
FlowRule.FlowRemoveReason |
reason()
Returns the reason for the flow received from switches.
|
TrafficSelector |
selector()
Returns the traffic selector that identifies what traffic this rule
should apply to.
|
TableId |
table()
Returns the table identifier for this rule.
|
int |
tableId()
Returns the table id for this rule.
|
int |
timeout()
Returns the timeout for this flow requested by an application.
|
java.lang.String |
toString() |
TrafficTreatment |
treatment()
Returns the traffic treatment that applies to selected traffic.
|
public DefaultFlowRule(FlowRule rule)
rule
- new flow rule@Deprecated public DefaultFlowRule(DeviceId deviceId, TrafficSelector selector, TrafficTreatment treatment, int priority, ApplicationId appId, int timeout, boolean permanent, FlowRuleExtPayLoad payLoad)
deviceId
- the identity of the device where this rule appliesselector
- the traffic selector that identifies what traffic this
ruletreatment
- the traffic treatment that applies to selected trafficpriority
- the flow rule priority given in natural orderappId
- the application id of this flowtimeout
- the timeout for this flow requested by an applicationpermanent
- whether the flow is permanent i.e. does not time outpayLoad
- 3rd-party origin private flow@Deprecated public DefaultFlowRule(DeviceId deviceId, TrafficSelector selector, TrafficTreatment treatment, int priority, ApplicationId appId, int timeout, int hardTimeout, boolean permanent, FlowRuleExtPayLoad payLoad)
deviceId
- the identity of the device where this rule appliesselector
- the traffic selector that identifies what traffic this
ruletreatment
- the traffic treatment that applies to selected trafficpriority
- the flow rule priority given in natural orderappId
- the application id of this flowtimeout
- the timeout for this flow requested by an applicationhardTimeout
- the hard timeout located switch's flow table for this flow requested by an applicationpermanent
- whether the flow is permanent i.e. does not time outpayLoad
- 3rd-party origin private flow@Deprecated public DefaultFlowRule(DeviceId deviceId, TrafficSelector selector, TrafficTreatment treatment, int priority, ApplicationId appId, GroupId groupId, int timeout, boolean permanent, FlowRuleExtPayLoad payLoad)
deviceId
- the identity of the device where this rule appliesselector
- the traffic selector that identifies what traffic this
ruletreatment
- the traffic treatment that applies to selected trafficpriority
- the flow rule priority given in natural orderappId
- the application id of this flowgroupId
- the group id of this flowtimeout
- the timeout for this flow requested by an applicationpermanent
- whether the flow is permanent i.e. does not time outpayLoad
- 3rd-party origin private flow@Deprecated public DefaultFlowRule(DeviceId deviceId, TrafficSelector selector, TrafficTreatment treatment, int priority, ApplicationId appId, GroupId groupId, int timeout, int hardTimeout, boolean permanent, FlowRuleExtPayLoad payLoad)
deviceId
- the identity of the device where this rule appliesselector
- the traffic selector that identifies what traffic this
ruletreatment
- the traffic treatment that applies to selected trafficpriority
- the flow rule priority given in natural orderappId
- the application id of this flowgroupId
- the group id of this flowtimeout
- the timeout for this flow requested by an applicationhardTimeout
- the hard timeout located switch's flow table for this flow requested by an applicationpermanent
- whether the flow is permanent i.e. does not time outpayLoad
- 3rd-party origin private flowpublic short appId()
FlowRule
public GroupId groupId()
FlowRule
public int priority()
FlowRule
public DeviceId deviceId()
FlowRule
public TrafficSelector selector()
FlowRule
public TrafficTreatment treatment()
FlowRule
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
FlowRule
public boolean exactMatch(FlowRule rule)
FlowRule
Exact match means that deviceId, priority, selector, tableId, flowId and treatment are equal. Note that this differs from the notion of object equality for flow rules, which does not consider the flowId or treatment when testing equality.
exactMatch
in interface FlowRule
rule
- other rule to match againstpublic java.lang.String toString()
toString
in class java.lang.Object
public int timeout()
FlowRule
public int hardTimeout()
FlowRule
hardTimeout
in interface FlowRule
public FlowRule.FlowRemoveReason reason()
FlowRule
public boolean isPermanent()
FlowRule
isPermanent
in interface FlowRule
public int tableId()
FlowRule
public TableId table()
FlowRule
public long created()
public static DefaultFlowRule.Builder builder()
public FlowRuleExtPayLoad payLoad()
FlowRule