commit | b81fdc1168cab85ea69b2db25f4aa48396e60e8b | [log] [tgz] |
---|---|---|
author | Jordan Halterman <jordan@opennetworking.org> | Mon Mar 04 18:12:20 2019 -0800 |
committer | Charles Chan <rascov@gmail.com> | Wed Mar 06 17:59:20 2019 -0800 |
tree | 730bfb4f915172b1d1b8f99af0ce7ea203b8b666 | |
parent | 3f731271d8981819024aa43cc132af67e1616848 [diff] [blame] |
Optimize filtering flow rule counts by state Change-Id: I1e1d80b8e618743ee449162a081cf42e71c99abf
diff --git a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java index 99ee528..d9bec9e 100644 --- a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java +++ b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
@@ -258,6 +258,13 @@ } @Override + public int getFlowRuleCount(DeviceId deviceId, FlowEntry.FlowEntryState state) { + checkPermission(FLOWRULE_READ); + checkNotNull(deviceId, "Device ID cannot be null"); + return store.getFlowRuleCount(deviceId, state); + } + + @Override public Iterable<FlowEntry> getFlowEntries(DeviceId deviceId) { checkPermission(FLOWRULE_READ); checkNotNull(deviceId, DEVICE_ID_NULL);