Add a zone to the watchlist.
        Zones on the watchlist will push all
        state changes (and those of the source they are currently connected to)
        back to the client
161971
def watch_zone(self, zone_id):
        
        r = yield from self._send_cmd(
                "WATCH %s ON" % (zone_id.device_str(), ))
        self._watched_zones.add(zone_id)
        return r
140282
def add_observer(self, observer, callble, priority=0):
        
        self.observers.add(priority, observer, callble)
210485
def _add_watch_block(self, params, filterCb, capacity=500, cb=None):
		
		if (self._wbslock == None):
			self._wbslock = Lock()

		self._wbslock.acquire()
		wb = WatchBlock(params, filterCb, capacity, cb)  # Add a List of Watchers
		if ((wb != None) and (wb.cb == None)):
			wb.cb = wb._dequeue_default_cb

		self._wbs.append(wb)
		self._wbslock.release()

		if self._cookie == None:
			return None
		if wb != None and len(self._wbs) == 1 and wb.params["pollSec"] == None:
			self._start_enqueue_thread()
		if self._enqueueThread == None:
			return wb

		self._enqueueThreadSignal.acquire()
		self._enqueueThreadSignal.notify()  # Notify
		self._enqueueThreadSignal.release()  # Release the Lock

		return wb
1144691
function addWatcher(dirPath) {
    Debug._l(dirPath);
    Watcher(dirPath, function (filePath, action) {
        switch (action) {
            case Watcher.ADD_EVENT:
            case Watcher.CHANGE_EVENT:
                Debug._l(generateIdFromFilePath(filePath));
                generateCache(filePath);
                break;

            case Watcher.DELETE_EVENT:
                removeCache(generateIdFromFilePath(filePath));
                break;

        }
    });

}
365927
def add_source(source)
      @semaphore.synchronize do
        @sources << source
      end

      if @registry.frozen?
        # already frozen, must reload everything
        self.reload!
      else
        @semaphore.synchronize do
          Fwissr.merge_conf!(@registry, source.get_conf)
        end
      end

      self.ensure_refresh_thread
    end
472806
public void addWatcher(final MongoNamespace namespace,
                                     final Callback<ChangeEvent<BsonDocument>, Object> watcher) {
    instanceChangeStreamListener.addWatcher(namespace, watcher);
  }
698494
private void pushState(int indentation) {
        states.push(state);
        state = new StreamStatus();
        state.setIndentationLevel(indentation);
    }
1003854
def _notify_add(self, slice_):
        """"""
        change = AddChange(self, slice_)
        self.notify_observers(change)
228489
@Deprecated
    public void addWatcher(File file, Listener watcher) {
        addWatcher(file.toPath(), watcher);
    }
59689
def unwatch_zone(self, zone_id):
        
        self._watched_zones.remove(zone_id)
        return (yield from
                self._send_cmd("WATCH %s OFF" % (zone_id.device_str(), )))
624956
def multizone_member_added(self, member_uuid):
        """"""
        casts = self._casts
        if member_uuid not in casts:
            casts[member_uuid] = {'listeners': [],
                                  'groups': set()}
        casts[member_uuid]['groups'].add(self._group_uuid)
        for listener in list(casts[member_uuid]['listeners']):
            listener.added_to_multizone(self._group_uuid)
1133755
def modify(self, monitor_id, options):
        """"""
        if not self._state:
            raise InvalidState("State was not properly obtained from the app")
        monitors = self.list()  # Get the latest set of monitors
        obj = None
        for monitor in monitors:
            if monitor_id != monitor['monitor_id']:
                continue
            obj = monitor
        if not monitor_id:
            raise MonitorNotFound("No monitor was found with that term.")
        options['action'] = 'MODIFY'
        options.update(obj)
        payload = self._build_payload(obj['term'], options)
        url = self.ALERTS_MODIFY_URL.format(requestX=self._state[3])
        self._log.debug("Modifying alert using: %s" % url)
        params = json.dumps(payload, separators=(',', ':'))
        data = {'params': params}
        response = self._session.post(url, data=data, headers=self.HEADERS)
        if response.status_code != 200:
            raise ActionError("Failed to create monitor: %s"
                              % response.content)
        return self.list()
87852
public void getNewLines() {
        try {
            List<MonitorLine> lines;
            if (getAll()) {
                lines = getSource().getLinesFrom(null);
            } else {
                lines = getSource().getLinesFrom(actual);
            }
            updateLines(lines);
        } catch (Exception e) {
            notifyObservers(e);
        }
    }
1141491
private Void indexUpdate(Collection<Consumer<Void>> state, Consumer<Void> indexAction) {
        if (async) {
            state.add(indexAction);
        } else {
            indexAction.accept(null);
        }
        return null;
    }
207101
void observe(FolderObserver observer) {
    synchronized (idleMutex) {
      this.observer = observer;
      pushedData = new PushedData();
      idleAcknowledged.set(false);
    }
  }
265178
public void updateState() {
        // Applying zoom patch (needed in case if image size is changed)
        stateController.applyZoomPatch(state);
        stateController.applyZoomPatch(prevState);
        stateController.applyZoomPatch(stateStart);
        stateController.applyZoomPatch(stateEnd);
        exitController.applyZoomPatch();

        boolean reset = stateController.updateState(state);
        if (reset) {
            notifyStateReset();
        } else {
            notifyStateUpdated();
        }
    }
85476
function _startWatchdog() {
    if (!watcher) {
      var watcherOptions = { persistent: !!options.persistent };
      watcher = fs.watch(folder, watcherOptions, function (event, filename) {
        if (event === 'change' && filename.charAt(0) != '.') {
          // On every change load the changed file. This will trigger notifications for interested
          // subscribers.
          _loadFile(filename);
        }
      });
    }
  }