Madan Jampani

Reenable consistent notification support

Change-Id: I08b50858344d5ea6dd8e2852d45fb31dcbab4660
......@@ -88,7 +88,9 @@ public interface Database extends DatabaseProxy<String, byte[]>, Resource<Databa
* 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.
......
......@@ -234,11 +234,6 @@ public class DefaultDatabase extends AbstractResource<Database> implements Datab
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) {
......
......@@ -366,11 +366,6 @@ public class PartitionedDatabase implements Database {
}
@Override
public boolean hasChangeNotificationSupport() {
return false;
}
@Override
public void registerConsumer(Consumer<StateMachineUpdate> consumer) {
partitions.forEach(p -> p.registerConsumer(consumer));
}
......