Reenable consistent notification support
Change-Id: I08b50858344d5ea6dd8e2852d45fb31dcbab4660
Showing
3 changed files
with
3 additions
and
11 deletions
... | @@ -88,7 +88,9 @@ public interface Database extends DatabaseProxy<String, byte[]>, Resource<Databa | ... | @@ -88,7 +88,9 @@ public interface Database extends DatabaseProxy<String, byte[]>, Resource<Databa |
88 | * Tells whether the database supports change notifications. | 88 | * Tells whether the database supports change notifications. |
89 | * @return true if notifications are supported; false otherwise | 89 | * @return true if notifications are supported; false otherwise |
90 | */ | 90 | */ |
91 | - boolean hasChangeNotificationSupport(); | 91 | + default boolean hasChangeNotificationSupport() { |
92 | + return true; | ||
93 | + } | ||
92 | 94 | ||
93 | /** | 95 | /** |
94 | * Registers a new consumer of StateMachineUpdates. | 96 | * Registers a new consumer of StateMachineUpdates. | ... | ... |
... | @@ -234,11 +234,6 @@ public class DefaultDatabase extends AbstractResource<Database> implements Datab | ... | @@ -234,11 +234,6 @@ public class DefaultDatabase extends AbstractResource<Database> implements Datab |
234 | consumers.remove(consumer); | 234 | consumers.remove(consumer); |
235 | } | 235 | } |
236 | 236 | ||
237 | - @Override | ||
238 | - public boolean hasChangeNotificationSupport() { | ||
239 | - return false; | ||
240 | - } | ||
241 | - | ||
242 | private class InternalStateMachineWatcher implements TriConsumer<String, Object, Object> { | 237 | private class InternalStateMachineWatcher implements TriConsumer<String, Object, Object> { |
243 | @Override | 238 | @Override |
244 | public void accept(String name, Object input, Object output) { | 239 | public void accept(String name, Object input, Object output) { | ... | ... |
... | @@ -366,11 +366,6 @@ public class PartitionedDatabase implements Database { | ... | @@ -366,11 +366,6 @@ public class PartitionedDatabase implements Database { |
366 | } | 366 | } |
367 | 367 | ||
368 | @Override | 368 | @Override |
369 | - public boolean hasChangeNotificationSupport() { | ||
370 | - return false; | ||
371 | - } | ||
372 | - | ||
373 | - @Override | ||
374 | public void registerConsumer(Consumer<StateMachineUpdate> consumer) { | 369 | public void registerConsumer(Consumer<StateMachineUpdate> consumer) { |
375 | partitions.forEach(p -> p.registerConsumer(consumer)); | 370 | partitions.forEach(p -> p.registerConsumer(consumer)); |
376 | } | 371 | } | ... | ... |
-
Please register or login to post a comment