Class DefaultTokenBucket

    • Method Detail

      • rate

        public long rate()
        Description copied from interface: TokenBucket
        Rate of traffic subject to the SLAs specified for this token bucket.
        Specified by:
        rate in interface TokenBucket
        Returns:
        the rate value
      • burstSize

        public long burstSize()
        Description copied from interface: TokenBucket
        Maximum burst size subject to the SLAs specified for this token bucket.
        Specified by:
        burstSize in interface TokenBucket
        Returns:
        the burst size in bytes
      • dscp

        public short dscp()
        Description copied from interface: TokenBucket
        Dscp value, it meaning depends on the used marking.
        Specified by:
        dscp in interface TokenBucket
        Returns:
        the dscp value for this token bucket
      • processedPackets

        public long processedPackets()
        Description copied from interface: TokenBucket
        Stats which reports how many packets have been processed so far. Availability of this information depends on the technology used for the implementation of the policer.
        Specified by:
        processedPackets in interface TokenBucket
        Returns:
        the processed packets
      • setProcessedPackets

        public void setProcessedPackets​(long packets)
        Description copied from interface: TokenBucketEntry
        Updates the number of packets seen by this token bucket.
        Specified by:
        setProcessedPackets in interface TokenBucketEntry
        Parameters:
        packets - a packet count.
      • processedBytes

        public long processedBytes()
        Description copied from interface: TokenBucket
        Stats which reports how many bytes have been processed so far. Availability of this information depends on the technology used for the implementation of the policer.
        Specified by:
        processedBytes in interface TokenBucket
        Returns:
        the processed bytes
      • setProcessedBytes

        public void setProcessedBytes​(long bytes)
        Description copied from interface: TokenBucketEntry
        Updates the number of bytes seen by this token bucket.
        Specified by:
        setProcessedBytes in interface TokenBucketEntry
        Parameters:
        bytes - a byte counter.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • 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