Interface TokenBucket

  • All Known Implementing Classes:
    DefaultTokenBucket

    @Beta
    public interface TokenBucket
    Generic abstraction for a token bucket which can mark and/or discard traffic. Each token bucket in ONOS is made up of a set of attributes which identifies the type.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static short MAX_DSCP
      Upper bound for DSCP.
      static short MIN_DSCP
      Lower bound for DSCP.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      TokenBucket.Action action()
      Action used by this token bucket for the exceeding traffic.
      long burstSize()
      Maximum burst size subject to the SLAs specified for this token bucket.
      short dscp()
      Dscp value, it meaning depends on the used marking.
      long processedBytes()
      Stats which reports how many bytes have been processed so far.
      long processedPackets()
      Stats which reports how many packets have been processed so far.
      long rate()
      Rate of traffic subject to the SLAs specified for this token bucket.
      TokenBucket.Type type()
      Token bucket type.
    • Method Detail

      • rate

        long rate()
        Rate of traffic subject to the SLAs specified for this token bucket.
        Returns:
        the rate value
      • burstSize

        long burstSize()
        Maximum burst size subject to the SLAs specified for this token bucket.
        Returns:
        the burst size in bytes
      • action

        TokenBucket.Action action()
        Action used by this token bucket for the exceeding traffic.
        Returns:
        the type of action
      • dscp

        short dscp()
        Dscp value, it meaning depends on the used marking.
        Returns:
        the dscp value for this token bucket
      • type

        TokenBucket.Type type()
        Token bucket type.
        Returns:
        the token bucket type
      • processedPackets

        long processedPackets()
        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.
        Returns:
        the processed packets
      • processedBytes

        long processedBytes()
        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.
        Returns:
        the processed bytes