Package org.onosproject.net.pi.runtime
Class PiTableEntry
- java.lang.Object
-
- org.onosproject.net.pi.runtime.PiTableEntry
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PiTableEntry.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PiTableAction
action()
Returns the action of this table entry.static PiTableEntry.Builder
builder()
Returns a table entry builder.long
cookie()
Returns the cookie of this table entry.PiCounterCellData
counter()
Returns the data of the counter cell associated with this table entry.boolean
equals(Object o)
PiTableEntryHandle
handle(DeviceId deviceId)
Returns a handle for this PI entity and the given device ID.int
hashCode()
boolean
isDefaultAction()
Returns true if this table entry contains the default action for this table, a.k.a.PiMatchKey
matchKey()
Returns the match key of this table entry.PiEntityType
piEntityType()
Returns the type of this entity.OptionalInt
priority()
Returns the priority of this table entry, if present.PiTableId
table()
Returns the table where this entry is installed.Optional<Double>
timeout()
Returns the timeout in seconds of this table entry, if present.String
toString()
-
-
-
Method Detail
-
table
public PiTableId table()
Returns the table where this entry is installed.- Returns:
- table identifier
-
matchKey
public PiMatchKey matchKey()
Returns the match key of this table entry.If
isDefaultAction()
istrue
this method returns the empty match key (PiMatchKey.EMPTY
).- Returns:
- match key
-
action
public PiTableAction action()
Returns the action of this table entry.- Returns:
- action
-
isDefaultAction
public boolean isDefaultAction()
Returns true if this table entry contains the default action for this table, a.k.a. table-miss entry, false otherwise.- Returns:
- boolean
-
cookie
public long cookie()
Returns the cookie of this table entry.- Returns:
- cookie
-
priority
public OptionalInt priority()
Returns the priority of this table entry, if present. If the priority value is not present, then this table entry has no explicit priority.- Returns:
- optional priority
-
timeout
public Optional<Double> timeout()
Returns the timeout in seconds of this table entry, if present. If the timeout value is not present, then this table entry is meant to be permanent.- Returns:
- optional timeout value in seconds
-
counter
public PiCounterCellData counter()
Returns the data of the counter cell associated with this table entry. This method is meaningful only if the table entry was read from the infrastructure device and the table has direct counters, otherwise returns null.- Returns:
- counter cell data
-
builder
public static PiTableEntry.Builder builder()
Returns a table entry builder.- Returns:
- a new builder
-
piEntityType
public PiEntityType piEntityType()
Description copied from interface:PiEntity
Returns the type of this entity.- Specified by:
piEntityType
in interfacePiEntity
- Returns:
- entity type
-
handle
public PiTableEntryHandle handle(DeviceId deviceId)
Description copied from interface:PiEntity
Returns a handle for this PI entity and the given device ID.
-
-