Reenable consistent notification support
Change-Id: I08b50858344d5ea6dd8e2852d45fb31dcbab4660
diff --git a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/Database.java b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/Database.java
index d48e74e..ff3e36a 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/Database.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/Database.java
@@ -88,7 +88,9 @@
* Tells whether the database supports change notifications.
* @return true if notifications are supported; false otherwise
*/
- boolean hasChangeNotificationSupport();
+ default boolean hasChangeNotificationSupport() {
+ return true;
+ }
/**
* Registers a new consumer of StateMachineUpdates.
diff --git a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DefaultDatabase.java b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DefaultDatabase.java
index e531fdf..b794f96 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DefaultDatabase.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DefaultDatabase.java
@@ -234,11 +234,6 @@
consumers.remove(consumer);
}
- @Override
- public boolean hasChangeNotificationSupport() {
- return false;
- }
-
private class InternalStateMachineWatcher implements TriConsumer<String, Object, Object> {
@Override
public void accept(String name, Object input, Object output) {
diff --git a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/PartitionedDatabase.java b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/PartitionedDatabase.java
index df858ce..6c537c0 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/PartitionedDatabase.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/PartitionedDatabase.java
@@ -366,11 +366,6 @@
}
@Override
- public boolean hasChangeNotificationSupport() {
- return false;
- }
-
- @Override
public void registerConsumer(Consumer<StateMachineUpdate> consumer) {
partitions.forEach(p -> p.registerConsumer(consumer));
}