CORD-394 Purge group/flow store when device goes offline
Stage 1: (this commit)
Add a component config purgeOnDisconnection, which is false by default.
When set to true, GroupManager and FlowManager will purge groups/flows
associated with a device when the device goes offline.
Stage 2: (upcoming commit)
Enable these configs in SegmentRoutingManager
Clean up group related information in SegmentRountingManager
Change-Id: I46d047d690d4641e030f6cdd084ce16ac02d8919
diff --git a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleStore.java b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleStore.java
index ae20f2a..0d62467 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleStore.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleStore.java
@@ -107,6 +107,13 @@
FlowRuleEvent pendingFlowRule(FlowEntry rule);
/**
+ * Removes all flow entries of given device from store.
+ *
+ * @param deviceId device id
+ */
+ void purgeFlowRule(DeviceId deviceId);
+
+ /**
* Updates the flow table statistics of the specified device using
* the given statistics.
*