Class PiTableEntry.Builder

  • Enclosing class:
    PiTableEntry

    public static final class PiTableEntry.Builder
    extends java.lang.Object
    • 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 is PiMatchKey.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