public interface MeterStore extends Store<MeterEvent,MeterStoreDelegate>
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<MeterStoreResult> |
deleteMeter(Meter meter)
Deletes a meter from the store.
|
void |
deleteMeterNow(Meter m)
Delete this meter immediately.
|
void |
failedMeter(MeterOperation op,
MeterFailReason reason)
Update the store by deleting the failed meter.
|
Collection<Meter> |
getAllMeters()
Returns all meters stored in the store.
|
Meter |
getMeter(MeterKey key)
Obtains a meter matching the given meter key.
|
CompletableFuture<MeterStoreResult> |
storeMeter(Meter meter)
Adds a meter to the store.
|
CompletableFuture<MeterStoreResult> |
updateMeter(Meter meter)
Updates a meter whose meter id is the same as the passed meter.
|
void |
updateMeterState(Meter meter)
Updates a given meter's state with the provided state.
|
hasDelegate, setDelegate, unsetDelegateCompletableFuture<MeterStoreResult> storeMeter(Meter meter)
meter - a meterCompletableFuture<MeterStoreResult> deleteMeter(Meter meter)
meter - a meterCompletableFuture<MeterStoreResult> updateMeter(Meter meter)
meter - a new metervoid updateMeterState(Meter meter)
meter - a meterMeter getMeter(MeterKey key)
key - a meter keyCollection<Meter> getAllMeters()
void failedMeter(MeterOperation op, MeterFailReason reason)
op - a failed meter operationreason - a failure reasonvoid deleteMeterNow(Meter m)
m - a meter