Package org.onosproject.net.meter
Interface MeterService
-
- All Superinterfaces:
ListenerService<MeterEvent,MeterListener>
public interface MeterService extends ListenerService<MeterEvent,MeterListener>
Service for add/updating and removing meters. Meters are are assigned to flow to rate limit them and provide a certain quality of service.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description MeterId
allocateMeterId(DeviceId deviceId)
Deprecated.in onos-2.5void
freeMeterId(DeviceId deviceId, MeterId meterId)
Deprecated.in onos-2.5Collection<Meter>
getAllMeters()
Fetches all the meters.Meter
getMeter(DeviceId deviceId, MeterCellId id)
Fetch the meter by the meter id.Meter
getMeter(DeviceId deviceId, MeterId id)
Deprecated.in onos-2.5, Replace MeterId with MeterCellIdCollection<Meter>
getMeters(DeviceId deviceId)
Fetches the meters by the device id.Collection<Meter>
getMeters(DeviceId deviceId, MeterScope scope)
Fetches the meters by the device id and scope.default void
purgeMeters(DeviceId deviceId)
Purges all the meters on the specified device.default void
purgeMeters(DeviceId deviceId, ApplicationId appId)
Purges all the meters on the given device and for the given application.Meter
submit(MeterRequest meter)
Adds a meter to the system and performs it installation.void
withdraw(MeterRequest meter, MeterCellId meterCellId)
Remove a meter from the system and the dataplane.void
withdraw(MeterRequest meter, MeterId meterId)
Deprecated.in onos-2.5, replace MeterId with MeterCellId-
Methods inherited from interface org.onosproject.event.ListenerService
addListener, removeListener
-
-
-
-
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 MeterCellIdRemove a meter from the system and the dataplane.- Parameters:
meter
- a meter to removemeterId
- 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 removemeterCellId
- 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 MeterCellIdFetch the meter by the meter id.- Parameters:
deviceId
- a device idid
- a meter id- Returns:
- a meter
-
getMeter
Meter getMeter(DeviceId deviceId, MeterCellId id)
Fetch the meter by the meter id.- Parameters:
deviceId
- a device idid
- 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 idscope
- meters scope- Returns:
- a collection of meters
-
allocateMeterId
@Deprecated MeterId allocateMeterId(DeviceId deviceId)
Deprecated.in onos-2.5Allocates 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.5Frees the given meter id.- Parameters:
deviceId
- the device idmeterId
- 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 identifierappId
- application identifier
-
-