Class PiCounterCellId


  • @Beta
    public final class PiCounterCellId
    extends java.lang.Object
    Identifier of a counter cell in a protocol-independent pipeline.
    • Method Detail

      • counterId

        public PiCounterId counterId()
        Returns the identifier of the counter instance where this cell is contained. Meaningful only if the counter is of type PiCounterType.INDIRECT.
        Returns:
        counter identifier
      • counterType

        public PiCounterType counterType()
        Returns the type of the counter identified.
        Returns:
        counter type
      • index

        public long index()
        Returns the counter index to which this cell ID is associated. Meaningful only if the counter is of type PiCounterType.INDIRECT.
        Returns:
        counter index
      • tableEntry

        public PiTableEntry tableEntry()
        Returns the table entry to which this cell ID is associated. Meaningful only if the counter is of type PiCounterType.DIRECT, otherwise returns null.
        Returns:
        PI table entry or null
      • ofDirect

        public static PiCounterCellId ofDirect​(PiTableEntry tableEntry)
        Return a direct counter cell ID for the given counter ID and table entry.
        Parameters:
        tableEntry - table entry
        Returns:
        counter cell ID
      • ofIndirect

        public static PiCounterCellId ofIndirect​(PiCounterId counterId,
                                                 long index)
        Return an indirect counter cell ID for the given counter ID and index.
        Parameters:
        counterId - counter ID
        index - index
        Returns:
        counter cell ID
      • equals

        public boolean equals​(java.lang.Object obj)
        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