public interface MeterService extends ListenerService<MeterEvent,MeterListener>
| Modifier and Type | Method and Description |
|---|---|
MeterId |
allocateMeterId(DeviceId deviceId)
Allocates a new meter id in the system.
|
void |
freeMeterId(DeviceId deviceId,
MeterId meterId)
Frees the given meter id.
|
Collection<Meter> |
getAllMeters()
Fetches all the meters.
|
Meter |
getMeter(DeviceId deviceId,
MeterId id)
Fetch the meter by the meter id.
|
Collection<Meter> |
getMeters(DeviceId deviceId)
Fetches the meters by the device id.
|
Meter |
submit(MeterRequest meter)
Adds a meter to the system and performs it installation.
|
void |
withdraw(MeterRequest meter,
MeterId meterId)
Remove a meter from the system and the dataplane.
|
addListener, removeListenerMeter submit(MeterRequest meter)
meter - a metervoid withdraw(MeterRequest meter, MeterId meterId)
meter - a meter to removemeterId - the meter id of the meter to remove.Meter getMeter(DeviceId deviceId, MeterId id)
deviceId - a device idid - a meter idCollection<Meter> getAllMeters()
Collection<Meter> getMeters(DeviceId deviceId)
deviceId - a device idMeterId allocateMeterId(DeviceId deviceId)
deviceId - the device id