Checks to see if slaves should be notified, and notifies them if needed
764274
def notify_slaves(self):
        """"""
        if self.disable_slave_notify is not None:
            LOGGER.debug('Slave notifications disabled')
            return False

        if self.zone_data()['kind'] == 'Master':
            response_code = self._put('/zones/' + self.domain + '/notify').status_code
            if response_code == 200:
                LOGGER.debug('Slave(s) notified')
                return True
            LOGGER.debug('Slave notification failed with code %i', response_code)
        else:
            LOGGER.debug('Zone type should be \'Master\' for slave notifications')
        return False
1050322
def notify(self, n=1):
        
        if not is_locked(self._lock):
            raise RuntimeError('lock is not locked')
        notified = [0]  # Work around lack of "nonlocal" in py27
        def walker(switcher, predicate):
            if not switcher.active:
                return False  # not not keep switcher that timed out
            if predicate and not predicate():
                return True
            if n >= 0 and notified[0] >= n:
                return True
            switcher.switch()
            notified[0] += 1
            return False  # only notify once
        walk_callbacks(self, walker)
1356933
function notify () {
    const newId = options.peerId
    const peerIds = Object.keys(peerTable)
    // check for all the peers
    // if same id skip
    // if notify === false skip
    // check the first finger that matches the criteria for ideal or next to ideal
    peerIds.forEach((peerId) => {
      if (newId === peerId) {
        return // skip ourselves
      }
      if (!peerTable[peerId].notify) {
        return // skip if it doesn't want to be notified of available peers
      }

      // if it had none, notify to get a successor
      if (peerTable[peerId].fingers['0'].current === undefined) {
        peerTable[peerId].fingers['0'].current = newId
        peerTable[peerId].socket.emit('we-update-finger', {
          row: '0',
          id: newId
        })
        return
      }

      const rows = Object.keys(peerTable[peerId].fingers)
      // find the first row that could use this finger
      rows.some((row) => {
        const finger = peerTable[peerId].fingers[row]
        const bestCandidate = fingerBestFit(
            new Id(peerId),
            new Id(finger.ideal),
            new Id(finger.current),
            new Id(newId))
        if (bestCandidate) {
          peerTable[peerId].fingers[row].current = newId
          peerTable[peerId].socket.emit('we-update-finger', {
            row: row,
            id: newId
          })
          return true
        }
      })
    })
  }
772848
public void notifyUpdate( URL resource, int expected, int count )
    {
        synchronized( m_Monitors )
        {
            for( StreamMonitor monitor : m_Monitors )
            {
                monitor.notifyUpdate( resource, expected, count );
            }
        }
    }
238462
def filter_slaves(self, slaves):
        ""
        slaves_alive = []
        for slave in slaves:
            if slave['is_odown'] or slave['is_sdown']:
                continue
            slaves_alive.append((slave['ip'], slave['port']))
        return slaves_alive
59225
def notify_listeners(self, msg_type, params):
        """"""
        for c in self.listeners:
            c.notify(msg_type, params)
923929
async def _notify_update(self, name, change_type, change_info=None, directed_client=None):
        """"""

        for monitor in self._monitors:
            try:
                result = monitor(name, change_type, change_info, directed_client=directed_client)
                if inspect.isawaitable(result):
                    await result
            except Exception:
                # We can't allow any exceptions in a monitor routine to break the server.
                self._logger.warning("Error calling monitor with update %s", name, exc_info=True)
554454
def notify(self, n: int = 1) -> None:
        """"""
        waiters = []  # Waiters we plan to run right now.
        while n and self._waiters:
            waiter = self._waiters.popleft()
            if not waiter.done():  # Might have timed out.
                n -= 1
                waiters.append(waiter)

        for waiter in waiters:
            future_set_result_unless_cancelled(waiter, True)
269642
def notify(self, new_jobs_count):
        

        if not self.use_notify():
            return

        # Not really useful to send more than 100 notifs (to be configured)
        count = min(new_jobs_count, 100)

        notify_key = redis_key("notify", self)

        context.connections.redis.lpush(notify_key, *([1] * count))
        context.connections.redis.expire(notify_key, max(1, int(context.get_current_config()["max_latency"] * 2)))
905422
def notify(self):
        
        if self.__method is not None:
            self.__method(self.__peer)
            return True
        return False
817350
def notify(self, topic, **kwargs):
        '''
        
        '''
        kwargs['name'] = self._name
        self._engine._notify(topic, **kwargs)
1181717
function notify(gobj, source) {
	const state = gobj.__gawk__;

	if (source === undefined) {
		source = gobj;
	}

	// if we're paused, add this object to the list of objects that may have changed
	if (state.queue) {
		state.queue.add(gobj);
		return;
	}

	// notify all of this object's listeners
	if (state.listeners) {
		for (const [ listener, filter ] of state.listeners) {
			if (filter) {
				const { found, obj } = filterObject(gobj, filter);

				// compute the hash of the stringified value
				const hash = hashValue(obj);

				// check if the value changed
				if ((found && !state.previous) || (state.previous && hash !== state.previous.get(listener))) {
					listener(obj, source);
				}

				if (!state.previous) {
					state.previous = new WeakMap();
				}

				state.previous.set(listener, hash);
			} else {
				listener(gobj, source);
			}
		}
	}

	// notify all of this object's parents
	if (state.parents) {
		for (const parent of state.parents) {
			notify(parent, source);
		}
	}
}
1045150
protected void notifyChatterObservers ()
    {
        _chatterObservers.apply(new ObserverList.ObserverOp<ChatterObserver>() {
            public boolean apply (ChatterObserver observer) {
                observer.chattersUpdated(_chatters.listIterator());
                return true;
            }
        });
    }
547676
def notify_batches_finished(self, statuses):
        
        with self._wait_condition:
            self._statuses = statuses
            self._wait_condition.notify()
1086149
protected void notifyToHandlers(ApiZone zone, ApiBuddyImpl buddy) {
        for(ServerHandlerClass handler : handlers) {
            notifyToHandler(handler, zone, buddy);
        }
    }
1156419
protected final void notifyChanged() {
        for (int i = mObservers.size() - 1; i >= 0; i--) {
            mObservers.get(i).onChanged();
        }
    }
278951
public void queueNotification (ObserverList<Object> observers, ObserverOp<Object> event)
    {
        _notify.add(new Tuple<ObserverList<Object>,ObserverOp<Object>>(observers, event));
    }