Interface MeterService

    • Method Detail

      • submit

        Meter submit​(MeterRequest meter)
        Adds a meter to the system and performs it installation.
        Parameters:
        meter - a meter
        Returns:
        a meter (with a meter id)
      • withdraw

        @Deprecated
        void withdraw​(MeterRequest meter,
                      MeterId meterId)
        Deprecated.
        in onos-2.5, replace MeterId with MeterCellId
        Remove a meter from the system and the dataplane.
        Parameters:
        meter - a meter to remove
        meterId - the meter id of the meter to remove.
      • withdraw

        void withdraw​(MeterRequest meter,
                      MeterCellId meterCellId)
        Remove a meter from the system and the dataplane.
        Parameters:
        meter - a meter to remove
        meterCellId - the meter cell id of the meter to remove.
      • getMeter

        @Deprecated
        Meter getMeter​(DeviceId deviceId,
                       MeterId id)
        Deprecated.
        in onos-2.5, Replace MeterId with MeterCellId
        Fetch the meter by the meter id.
        Parameters:
        deviceId - a device id
        id - a meter id
        Returns:
        a meter
      • getMeter

        Meter getMeter​(DeviceId deviceId,
                       MeterCellId id)
        Fetch the meter by the meter id.
        Parameters:
        deviceId - a device id
        id - a meter cell id
        Returns:
        a meter
      • getAllMeters

        Collection<Meter> getAllMeters()
        Fetches all the meters.
        Returns:
        a collection of meters
      • getMeters

        Collection<Meter> getMeters​(DeviceId deviceId)
        Fetches the meters by the device id.
        Parameters:
        deviceId - a device id
        Returns:
        a collection of meters
      • getMeters

        Collection<Meter> getMeters​(DeviceId deviceId,
                                    MeterScope scope)
        Fetches the meters by the device id and scope.
        Parameters:
        deviceId - a device id
        scope - meters scope
        Returns:
        a collection of meters
      • allocateMeterId

        @Deprecated
        MeterId allocateMeterId​(DeviceId deviceId)
        Deprecated.
        in onos-2.5
        Allocates a new meter id in the system.
        Parameters:
        deviceId - the device id
        Returns:
        the allocated meter id, null if there is an internal error or there are no meter ids available
      • freeMeterId

        @Deprecated
        void freeMeterId​(DeviceId deviceId,
                         MeterId meterId)
        Deprecated.
        in onos-2.5
        Frees the given meter id.
        Parameters:
        deviceId - the device id
        meterId - the id to be freed
      • purgeMeters

        default void purgeMeters​(DeviceId deviceId)
        Purges all the meters on the specified device.
        Parameters:
        deviceId - device identifier
      • purgeMeters

        default void purgeMeters​(DeviceId deviceId,
                                 ApplicationId appId)
        Purges all the meters on the given device and for the given application.
        Parameters:
        deviceId - device identifier
        appId - application identifier