Package org.onosproject.net.pi.runtime
Class PiTableEntry.Builder
- java.lang.Object
-
- org.onosproject.net.pi.runtime.PiTableEntry.Builder
-
- Enclosing class:
- PiTableEntry
public static final class PiTableEntry.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PiTableEntry
build()
Builds the table entry.PiTableEntry.Builder
forTable(PiTableId tableId)
Sets the table identifier for this entry.PiTableEntry.Builder
withAction(PiTableAction tableAction)
Sets the action of this table entry.PiTableEntry.Builder
withCookie(long cookie)
Sets the cookie, i.e.PiTableEntry.Builder
withCounterCellData(PiCounterCellData data)
Sets the counter cell data of this table entry.PiTableEntry.Builder
withMatchKey(PiMatchKey matchKey)
Sets the match key of this table entry.PiTableEntry.Builder
withPriority(int priority)
Sets the priority of this table entry.PiTableEntry.Builder
withTimeout(double seconds)
Sets the timeout of this table entry.
-
-
-
Method Detail
-
forTable
public PiTableEntry.Builder forTable(PiTableId tableId)
Sets the table identifier for this entry.- Parameters:
tableId
- table identifier- Returns:
- this
-
withAction
public PiTableEntry.Builder withAction(PiTableAction tableAction)
Sets the action of this table entry.- Parameters:
tableAction
- table action- Returns:
- this
-
withMatchKey
public PiTableEntry.Builder withMatchKey(PiMatchKey matchKey)
Sets the match key of this table entry. By default, the match key isPiMatchKey.EMPTY
, i.e. any match.- Parameters:
matchKey
- match key- Returns:
- this
-
withCookie
public PiTableEntry.Builder withCookie(long cookie)
Sets the cookie, i.e. a controller-specific metadata.- Parameters:
cookie
- cookie- Returns:
- this
-
withPriority
public PiTableEntry.Builder withPriority(int priority)
Sets the priority of this table entry.- Parameters:
priority
- priority- Returns:
- this
-
withTimeout
public PiTableEntry.Builder withTimeout(double seconds)
Sets the timeout of this table entry.- Parameters:
seconds
- timeout in seconds- Returns:
- this
-
withCounterCellData
public PiTableEntry.Builder withCounterCellData(PiCounterCellData data)
Sets the counter cell data of this table entry.- Parameters:
data
- counter cell data- Returns:
- this
-
build
public PiTableEntry build()
Builds the table entry.- Returns:
- a new table entry
-
-