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 classPiTableEntry.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PiTableActionaction()Returns the action of this table entry.static PiTableEntry.Builderbuilder()Returns a table entry builder.longcookie()Returns the cookie of this table entry.PiCounterCellDatacounter()Returns the data of the counter cell associated with this table entry.booleanequals(java.lang.Object o)PiTableEntryHandlehandle(DeviceId deviceId)Returns a handle for this PI entity and the given device ID.inthashCode()booleanisDefaultAction()Returns true if this table entry contains the default action for this table, a.k.a.PiMatchKeymatchKey()Returns the match key of this table entry.PiEntityTypepiEntityType()Returns the type of this entity.java.util.OptionalIntpriority()Returns the priority of this table entry, if present.PiTableIdtable()Returns the table where this entry is installed.java.util.Optional<java.lang.Double>timeout()Returns the timeout in seconds of this table entry, if present.java.lang.StringtoString()
-
-
-
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()istruethis 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 java.util.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 java.util.Optional<java.lang.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
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
builder
public static PiTableEntry.Builder builder()
Returns a table entry builder.- Returns:
- a new builder
-
piEntityType
public PiEntityType piEntityType()
Description copied from interface:PiEntityReturns the type of this entity.- Specified by:
piEntityTypein interfacePiEntity- Returns:
- entity type
-
handle
public PiTableEntryHandle handle(DeviceId deviceId)
Description copied from interface:PiEntityReturns a handle for this PI entity and the given device ID.
-
-