zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanm <...@git.apache.org>
Subject [GitHub] zookeeper pull request #590: [ZOOKEEPER-1177] Add the memory optimized watch...
Date Sat, 22 Sep 2018 04:38:34 GMT
Github user hanm commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/590#discussion_r219643998
  
    --- Diff: src/java/main/org/apache/zookeeper/server/watch/WatchManager.java ---
    @@ -83,18 +97,21 @@ synchronized void removeWatcher(Watcher watcher) {
                 Set<Watcher> list = watchTable.get(p);
                 if (list != null) {
                     list.remove(watcher);
    -                if (list.size() == 0) {
    +                if (list.isEmpty()) {
                         watchTable.remove(p);
                     }
                 }
             }
         }
     
    -    Set<Watcher> triggerWatch(String path, EventType type) {
    +    @Override
    +    public WatcherOrBitSet triggerWatch(String path, EventType type) {
             return triggerWatch(path, type, null);
         }
     
    -    Set<Watcher> triggerWatch(String path, EventType type, Set<Watcher> supress)
{
    +    @Override
    +    public WatcherOrBitSet triggerWatch(
    +            String path, EventType type, WatcherOrBitSet supress) {
    --- End diff --
    
    `suppress ` instead of `supress`


---

Mime
View raw message