public interface VirtualNetworkMeterStore extends VirtualStore<MeterEvent,MeterStoreDelegate>
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.CompletableFuture<MeterStoreResult> |
deleteMeter(NetworkId networkId,
Meter meter)
Deletes a meter from the store.
|
MeterStoreResult |
deleteMeterFeatures(NetworkId networkId,
DeviceId deviceId)
Deletes the meter features from the store.
|
void |
deleteMeterNow(NetworkId networkId,
Meter m)
Delete this meter immediately.
|
void |
failedMeter(NetworkId networkId,
MeterOperation op,
MeterFailReason reason)
Update the store by deleting the failed meter.
|
java.util.Collection<Meter> |
getAllMeters(NetworkId networkId)
Returns all meters stored in the store.
|
long |
getMaxMeters(NetworkId networkId,
MeterFeaturesKey key)
Retrieve maximum meters available for the device.
|
Meter |
getMeter(NetworkId networkId,
MeterKey key)
Obtains a meter matching the given meter key.
|
java.util.concurrent.CompletableFuture<MeterStoreResult> |
storeMeter(NetworkId networkId,
Meter meter)
Adds a meter to the store.
|
MeterStoreResult |
storeMeterFeatures(NetworkId networkId,
MeterFeatures meterfeatures)
Adds the meter features to the store.
|
java.util.concurrent.CompletableFuture<MeterStoreResult> |
updateMeter(NetworkId networkId,
Meter meter)
Updates a meter whose meter id is the same as the passed meter.
|
void |
updateMeterState(NetworkId networkId,
Meter meter)
Updates a given meter's state with the provided state.
|
hasDelegate, setDelegate, unsetDelegate
java.util.concurrent.CompletableFuture<MeterStoreResult> storeMeter(NetworkId networkId, Meter meter)
networkId
- a virtual network identifiermeter
- a meterjava.util.concurrent.CompletableFuture<MeterStoreResult> deleteMeter(NetworkId networkId, Meter meter)
networkId
- a virtual network identifiermeter
- a meterMeterStoreResult storeMeterFeatures(NetworkId networkId, MeterFeatures meterfeatures)
networkId
- a virtual network identifiermeterfeatures
- the meter featuresMeterStoreResult deleteMeterFeatures(NetworkId networkId, DeviceId deviceId)
networkId
- a virtual network identifierdeviceId
- the device idjava.util.concurrent.CompletableFuture<MeterStoreResult> updateMeter(NetworkId networkId, Meter meter)
networkId
- a virtual network identifiermeter
- a new metervoid updateMeterState(NetworkId networkId, Meter meter)
networkId
- a virtual network identifiermeter
- a meterMeter getMeter(NetworkId networkId, MeterKey key)
networkId
- a virtual network identifierkey
- a meter keyjava.util.Collection<Meter> getAllMeters(NetworkId networkId)
networkId
- a virtual network identifiervoid failedMeter(NetworkId networkId, MeterOperation op, MeterFailReason reason)
networkId
- a virtual network identifierop
- a failed meter operationreason
- a failure reasonvoid deleteMeterNow(NetworkId networkId, Meter m)
networkId
- a virtual network identifierm
- a meterlong getMaxMeters(NetworkId networkId, MeterFeaturesKey key)
networkId
- a virtual network identifierkey
- the meter features key