Class PiCriterion.Builder
- java.lang.Object
-
- org.onosproject.net.flow.criteria.PiCriterion.Builder
-
- Enclosing class:
- PiCriterion
@Beta public static final class PiCriterion.Builder extends java.lang.Object
PiCriterion Builder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PiCriterion.Builder
add(PiFieldMatch field)
Adds a match field to the builder.PiCriterion
build()
Builds a PiCriterion.PiCriterion.Builder
matchExact(PiMatchFieldId fieldId, byte[] value)
Adds an exact field match for the given fieldId and value.PiCriterion.Builder
matchExact(PiMatchFieldId fieldId, int value)
Adds an exact field match for the given fieldId and value.PiCriterion.Builder
matchExact(PiMatchFieldId fieldId, long value)
Adds an exact field match for the given fieldId and value.PiCriterion.Builder
matchExact(PiMatchFieldId fieldId, short value)
Adds an exact field match for the given fieldId and value.PiCriterion.Builder
matchLpm(PiMatchFieldId fieldId, byte[] value, int prefixLength)
Adds a longest-prefix field match for the given fieldId, value and prefix length.PiCriterion.Builder
matchLpm(PiMatchFieldId fieldId, int value, int prefixLength)
Adds a longest-prefix field match for the given fieldId, value and prefix length.PiCriterion.Builder
matchLpm(PiMatchFieldId fieldId, long value, int prefixLength)
Adds a longest-prefix field match for the given fieldId, value and prefix length.PiCriterion.Builder
matchLpm(PiMatchFieldId fieldId, short value, int prefixLength)
Adds a longest-prefix field match for the given fieldId, value and prefix length.PiCriterion.Builder
matchRange(PiMatchFieldId fieldId, byte[] low, byte[] high)
Adds a range field match for the given fieldId, low and high.PiCriterion.Builder
matchRange(PiMatchFieldId fieldId, int low, int high)
Adds a range field match for the given fieldId, low and high.PiCriterion.Builder
matchRange(PiMatchFieldId fieldId, long low, long high)
Adds a range field match for the given fieldId, low and high.PiCriterion.Builder
matchRange(PiMatchFieldId fieldId, short low, short high)
Adds a range field match for the given fieldId, low and high.PiCriterion.Builder
matchTernary(PiMatchFieldId fieldId, byte[] value, byte[] mask)
Adds a ternary field match for the given fieldId, value and mask.PiCriterion.Builder
matchTernary(PiMatchFieldId fieldId, int value, int mask)
Adds a ternary field match for the given fieldId, value and mask.PiCriterion.Builder
matchTernary(PiMatchFieldId fieldId, long value, long mask)
Adds a ternary field match for the given fieldId, value and mask.PiCriterion.Builder
matchTernary(PiMatchFieldId fieldId, short value, short mask)
Adds a ternary field match for the given fieldId, value and mask.
-
-
-
Method Detail
-
add
public PiCriterion.Builder add(PiFieldMatch field)
Adds a match field to the builder.- Parameters:
field
- the field value- Returns:
- this
-
matchExact
public PiCriterion.Builder matchExact(PiMatchFieldId fieldId, short value)
Adds an exact field match for the given fieldId and value.- Parameters:
fieldId
- protocol-independent header field Idvalue
- exact match value- Returns:
- this
-
matchExact
public PiCriterion.Builder matchExact(PiMatchFieldId fieldId, int value)
Adds an exact field match for the given fieldId and value.- Parameters:
fieldId
- protocol-independent header field Idvalue
- exact match value- Returns:
- this
-
matchExact
public PiCriterion.Builder matchExact(PiMatchFieldId fieldId, long value)
Adds an exact field match for the given fieldId and value.- Parameters:
fieldId
- protocol-independent header field Idvalue
- exact match value- Returns:
- this
-
matchExact
public PiCriterion.Builder matchExact(PiMatchFieldId fieldId, byte[] value)
Adds an exact field match for the given fieldId and value.- Parameters:
fieldId
- protocol-independent header field Idvalue
- exact match value- Returns:
- this
-
matchTernary
public PiCriterion.Builder matchTernary(PiMatchFieldId fieldId, short value, short mask)
Adds a ternary field match for the given fieldId, value and mask.- Parameters:
fieldId
- protocol-independent header field Idvalue
- ternary match valuemask
- ternary match mask- Returns:
- this
-
matchTernary
public PiCriterion.Builder matchTernary(PiMatchFieldId fieldId, int value, int mask)
Adds a ternary field match for the given fieldId, value and mask.- Parameters:
fieldId
- protocol-independent header field Idvalue
- ternary match valuemask
- ternary match mask- Returns:
- this
-
matchTernary
public PiCriterion.Builder matchTernary(PiMatchFieldId fieldId, long value, long mask)
Adds a ternary field match for the given fieldId, value and mask.- Parameters:
fieldId
- protocol-independent header field Idvalue
- ternary match valuemask
- ternary match mask- Returns:
- this
-
matchTernary
public PiCriterion.Builder matchTernary(PiMatchFieldId fieldId, byte[] value, byte[] mask)
Adds a ternary field match for the given fieldId, value and mask.- Parameters:
fieldId
- protocol-independent header field Idvalue
- ternary match valuemask
- ternary match mask- Returns:
- this
-
matchLpm
public PiCriterion.Builder matchLpm(PiMatchFieldId fieldId, short value, int prefixLength)
Adds a longest-prefix field match for the given fieldId, value and prefix length.- Parameters:
fieldId
- protocol-independent header field Idvalue
- lpm match valueprefixLength
- lpm match prefix length- Returns:
- this
-
matchLpm
public PiCriterion.Builder matchLpm(PiMatchFieldId fieldId, int value, int prefixLength)
Adds a longest-prefix field match for the given fieldId, value and prefix length.- Parameters:
fieldId
- protocol-independent header field Idvalue
- lpm match valueprefixLength
- lpm match prefix length- Returns:
- this
-
matchLpm
public PiCriterion.Builder matchLpm(PiMatchFieldId fieldId, long value, int prefixLength)
Adds a longest-prefix field match for the given fieldId, value and prefix length.- Parameters:
fieldId
- protocol-independent header field Idvalue
- lpm match valueprefixLength
- lpm match prefix length- Returns:
- this
-
matchLpm
public PiCriterion.Builder matchLpm(PiMatchFieldId fieldId, byte[] value, int prefixLength)
Adds a longest-prefix field match for the given fieldId, value and prefix length.- Parameters:
fieldId
- protocol-independent header field Idvalue
- lpm match valueprefixLength
- lpm match prefix length- Returns:
- this
-
matchRange
public PiCriterion.Builder matchRange(PiMatchFieldId fieldId, short low, short high)
Adds a range field match for the given fieldId, low and high.- Parameters:
fieldId
- protocol-independent header field Idlow
- range match low valuehigh
- range match high value- Returns:
- this
-
matchRange
public PiCriterion.Builder matchRange(PiMatchFieldId fieldId, int low, int high)
Adds a range field match for the given fieldId, low and high.- Parameters:
fieldId
- protocol-independent header field Idlow
- range match low valuehigh
- range match high value- Returns:
- this
-
matchRange
public PiCriterion.Builder matchRange(PiMatchFieldId fieldId, long low, long high)
Adds a range field match for the given fieldId, low and high.- Parameters:
fieldId
- protocol-independent header field Idlow
- range match low valuehigh
- range match high value- Returns:
- this
-
matchRange
public PiCriterion.Builder matchRange(PiMatchFieldId fieldId, byte[] low, byte[] high)
Adds a range field match for the given fieldId, low and high.- Parameters:
fieldId
- protocol-independent header field Idlow
- range match low valuehigh
- range match high value- Returns:
- this
-
build
public PiCriterion build()
Builds a PiCriterion.- Returns:
- PiCriterion
-
-