use of org.onosproject.net.meter.MeterFailReason.TIMEOUT in project onos by opennetworkinglab.
the class DistributedMeterStore method deleteMeterFeatures.
@Override
public MeterStoreResult deleteMeterFeatures(DeviceId deviceId) {
MeterStoreResult result = MeterStoreResult.success();
try {
Set<MeterTableKey> keys = metersFeatures.keySet().stream().filter(key -> key.deviceId().equals(deviceId)).collect(Collectors.toUnmodifiableSet());
keys.forEach(k -> metersFeatures.remove(k));
} catch (StorageException e) {
log.error("{} thrown a storage exception: {}", e.getStackTrace()[0].getMethodName(), e.getMessage(), e);
result = MeterStoreResult.fail(TIMEOUT);
}
return result;
}
Aggregations