Class PiTableEntry

  • All Implemented Interfaces:
    PiEntity

    @Beta
    public final class PiTableEntry
    extends java.lang.Object
    implements PiEntity
    Instance of a table entry in a protocol-independent pipeline.
    • Method Detail

      • table

        public PiTableId table()
        Returns the table where this entry is installed.
        Returns:
        table identifier
      • 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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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: PiEntity
        Returns the type of this entity.
        Specified by:
        piEntityType in interface PiEntity
        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.
        Specified by:
        handle in interface PiEntity
        Parameters:
        deviceId - device ID
        Returns:
        handle