Class PiMeterCellId

  • All Implemented Interfaces:
    MeterCellId

    @Beta
    public final class PiMeterCellId
    extends java.lang.Object
    implements MeterCellId
    Identifier of a meter cell in a protocol-independent pipeline.
    • Method Detail

      • meterId

        public PiMeterId meterId()
        Returns the identifier of the meter instance where this cell is contained. Meaningful only if the meter is of type PiMeterType.DIRECT, otherwise returns null.
        Returns:
        meter identifier
      • meterType

        public PiMeterType meterType()
        Returns the type of the meter identified.
        Returns:
        meter type
      • index

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

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

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

        public static PiMeterCellId ofIndirect​(PiMeterId meterId,
                                               long index)
        Return an indirect meter cell ID for the given meter ID and index.
        Parameters:
        meterId - meter ID
        index - index
        Returns:
        meter 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