Interface Meter.Builder

  • All Known Implementing Classes:
    DefaultMeter.Builder
    Enclosing interface:
    Meter

    public static interface Meter.Builder
    A meter builder.
    • Method Detail

      • forDevice

        Meter.Builder forDevice​(DeviceId deviceId)
        Assigns the target device for this meter.
        Parameters:
        deviceId - a device id
        Returns:
        this
      • withCellId

        Meter.Builder withCellId​(MeterCellId meterId)
        Assigns the id to this meter cell.
        Parameters:
        meterId - a meter cell identifier
        Returns:
        this
      • fromApp

        Meter.Builder fromApp​(ApplicationId appId)
        Assigns the application that built this meter.
        Parameters:
        appId - an application id
        Returns:
        this
      • withUnit

        Meter.Builder withUnit​(Meter.Unit unit)
        Assigns the @See Unit to use for this meter. Defaults to kb/s
        Parameters:
        unit - a unit
        Returns:
        this
      • burst

        Meter.Builder burst()
        Sets this meter as applicable to burst traffic only. Defaults to false.
        Returns:
        this
      • withBands

        Meter.Builder withBands​(Collection<Band> bands)
        Assigns bands to this meter. There must be at least one band.
        Parameters:
        bands - a collection of bands
        Returns:
        this
      • withAnnotations

        Meter.Builder withAnnotations​(Annotations annotations)
        Sets the annotations.
        Parameters:
        annotations - annotations
        Returns:
        builder object
      • build

        Meter build()
        Builds the meter based on the specified parameters.
        Returns:
        a meter