Method used to notify manager for a tracking event. Metric is free to call this method as per
implementation. Timer based or Azkaban events are the most common implementation {@inheritDoc}

@see azkaban.metric.IMetric#notifyManager()
507079
@Override
  public void notifyManager() {
    logger.debug(String.format("Notifying Manager for %s", this.getClass().getName()));
    try {
      this.metricManager.reportMetric(this);
    } catch (final Throwable ex) {
      logger.error(
          String.format("Metric Manager is not set for %s metric", this.getClass().getName()), ex);
    }
  }
905074
public void notifyTaskAction(String action, Integer previousStatus, Integer previousState)
    throws ServiceException, DataAccessException {
        CodeTimer timer = new CodeTimer("TaskManager.notifyStatusChange()", true);

        try {
            // new-style notifiers
            String outcome = TaskStatuses.getTaskStatuses().get(taskInstance.getStatusCode());
            //if (!action.equals(TaskAction.CLAIM) && !action.equals(TaskAction.RELEASE))  // avoid nuisance notice to claimer and releaser
            sendNotification(action, outcome);

            // new-style auto-assign
            if (TaskStatus.STATUS_OPEN.intValue() == taskInstance.getStatusCode().intValue()
                    && !action.equals(TaskAction.RELEASE)) {
                AutoAssignStrategy strategy = getAutoAssignStrategy();
                if (strategy != null) {
                    User assignee = strategy.selectAssignee(taskInstance);
                    if (assignee == null)
                        logger.severe("No users found for auto-assignment of task instance ID: " + taskInstance.getTaskInstanceId());
                    else
                    {
                      taskInstance.setAssigneeId(assignee.getId());
                      taskInstance.setAssigneeCuid(assignee.getCuid());
                      performAction(TaskAction.ASSIGN, assignee.getId(), assignee.getId(), "Auto-assigned", null, false, false);
                    }
                }
            }
        }
        catch (ObserverException ex) {
            // do not rethrow; observer problems should not prevent task actions
            logger.severeException(ex.getMessage(), ex);
        }
        catch (StrategyException ex) {
            logger.severeException(ex.getMessage(), ex);
        }
        timer.stopAndLogTiming("");
    }
643581
@Override
	public void notifyOfAddedMetric(Metric metric, String metricName, MetricGroup group) {
		final String fullName = group.getMetricIdentifier(metricName, this);

		synchronized (this) {
			if (metric instanceof Counter) {
				counters.put((Counter) metric, fullName);
				registry.register(fullName, new FlinkCounterWrapper((Counter) metric));
			}
			else if (metric instanceof Gauge) {
				gauges.put((Gauge<?>) metric, fullName);
				registry.register(fullName, FlinkGaugeWrapper.fromGauge((Gauge<?>) metric));
			} else if (metric instanceof Histogram) {
				Histogram histogram = (Histogram) metric;
				histograms.put(histogram, fullName);

				if (histogram instanceof DropwizardHistogramWrapper) {
					registry.register(fullName, ((DropwizardHistogramWrapper) histogram).getDropwizardHistogram());
				} else {
					registry.register(fullName, new FlinkHistogramWrapper(histogram));
				}
			} else if (metric instanceof Meter) {
				Meter meter = (Meter) metric;
				meters.put(meter, fullName);

				if (meter instanceof DropwizardMeterWrapper) {
					registry.register(fullName, ((DropwizardMeterWrapper) meter).getDropwizardMeter());
				} else {
					registry.register(fullName, new FlinkMeterWrapper(meter));
				}
			} else {
				log.warn("Cannot add metric of type {}. This indicates that the reporter " +
					"does not support this metric type.", metric.getClass().getName());
			}
		}
	}
266146
public void catchNotifications() {

        m_catchNotifications = true;
        if (isShowing()) {
            installNotificationWidget();
        }
        if (m_closingHandlerRegistration == null) {
            // when closing the dialog
            m_closingHandlerRegistration = addCloseHandler(new CloseHandler<PopupPanel>() {

                /**
                 * @see CloseHandler#onClose(CloseEvent)
                 */
                public void onClose(CloseEvent<PopupPanel> event) {

                    clearNotifications();
                }
            });
        }
    }
1264251
private void requestNotificationListener() {
        AndPermission.with(this)
            .notification()
            .listener()
            .rationale(new NotifyListenerRationale())
            .onGranted(new Action<Void>() {
                @Override
                public void onAction(Void data) {
                    toast(R.string.successfully);
                }
            })
            .onDenied(new Action<Void>() {
                @Override
                public void onAction(Void data) {
                    toast(R.string.failure);
                }
            })
            .start();
    }
1080965
public function notify()
    {
        if (0 < count($this->observers)) {
            foreach ($this->observers as $observer) {
                /** @var \Liip\Drupal\Modules\EventManager\EventObserverInterface $observer */
                $observer->update($this);
            }
        }
    }
318604
@Override
    public void indicateProgress() {
        verifySystemOut();
        progressIndicatorActive = true;
        if (isAnsiEnabled()) {
            if (lastMessage != null && lastMessage.length() > 0) {
                if (!lastMessage.contains(maxIndicatorString)) {
                    updateStatus(lastMessage + indicator);
                }
            }
        } else {
            out.print(indicator);
        }
    }
557986
private void notifyMessageReceived(QueueData queueData)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "notifyMessageReceived", queueData);

      long messageLength = queueData.getMessageLength();
      if (trackBytes)
      {
         bytesReceivedSinceLastRequestForMsgs += messageLength;
      }

      // Update the message arrival time
      queueData.updateArrivalTime(approxTimeThread.getApproxTime());

      messagesReceived++;
      currentBytesOnQueue += messageLength;

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "notifyMessageReceived");
   }
618936
public void sendNotification(final Notification notification) {

    ContextAwareTimer.Context timer = this.notificationTimer.time();
    if(!this.notificationTargets.isEmpty()) {
        for (final Map.Entry<UUID, Function<Notification, Void>> entry : this.notificationTargets.entrySet()) {
          try {
            entry.getValue().apply(notification);
          } catch (RuntimeException exception) {
            LOG.warn("RuntimeException when running notification target. Skipping.", exception);
          }
        }
    }

    if(getParent().isPresent()) {
      getParent().get().sendNotification(notification);
    }
    timer.stop();
  }
800125
private void notifyMotionListeners(BufferedImage currentOriginal) {
		WebcamMotionEvent wme = new WebcamMotionEvent(this, previousOriginal, currentOriginal, algorithm.getArea(), algorithm.getCog(), algorithm.getPoints());
		for (WebcamMotionListener l : listeners) {
			try {
				l.motionDetected(wme);
			} catch (Exception e) {
				WebcamExceptionHandler.handle(e);
			}
		}
	}
172954
@Override
    public void doSessionClosedListeners() {
        runManagementTask(new Runnable() {
            @Override
            public void run() {
                try {
                    // The particular management listeners change on strategy, so get them here.
                    for (final SessionManagementListener listener : getManagementListeners()) {
                        listener.doSessionClosed(SessionManagementBeanImpl.this);
                    }

                    // XXX should there be a markChanged() here because the session status is now closed?
                    // Or is that covered by the fact we generate a session-closed message?
                } catch (Exception ex) {
                    logger.warn("Error during doSessionClosed session listener notifications:", ex);
                }
            }
        });
    }
57090
public function checkTrackings()
    {
        foreach ($this->tracked as $name => $tracked) {
            list($resource, $listener) = $tracked;

            if (!$events = $resource->detectChanges()) {
                continue;
            }

            foreach ($events as $event) {
                if ($event instanceof Event) {
                    $this->callListenerBindings($listener, $event);
                }
            }
        }
    }
903372
protected void notifyInit () {
		final String sourceMethod = "notifyInit"; //$NON-NLS-1$
		IServiceReference[] refs = null;
		try {
			if(_aggregator != null && _aggregator.getPlatformServices() != null){
				refs = _aggregator.getPlatformServices().getServiceReferences(ICacheManagerListener.class.getName(),"(name=" + _aggregator.getName() + ")");	//$NON-NLS-1$ //$NON-NLS-2$
				if (refs != null) {
					for (IServiceReference ref : refs) {
						ICacheManagerListener listener = (ICacheManagerListener)_aggregator.getPlatformServices().getService(ref);
						if (listener != null) {
							try {
								listener.initialized(this);
							} catch (Throwable t) {
								if (log.isLoggable(Level.WARNING)) {
									log.logp(Level.WARNING, CacheManagerImpl.class.getName(), sourceMethod, t.getMessage(), t);
								}
							} finally {
								_aggregator.getPlatformServices().ungetService(ref);
							}
						}
					}
				}
			}
		} catch (PlatformServicesException e) {
			if (log.isLoggable(Level.SEVERE)) {
				log.log(Level.SEVERE, e.getMessage(), e);
			}
		}
	}
907231
protected void notifyHandler(ServerHandlerClass handler, Object zoneAgent) {
	    ReflectMethodUtil.invokeHandleMethod(handler.getHandleMethod(), 
	            handler.newInstance(), context, zoneAgent);
	}
298916
protected void notifyToHandler(ServerHandlerClass handler, 
            ApiZone zone, ApiBuddyImpl buddy) {
        ReflectMethodUtil.invokeHandleMethod(
                handler.getHandleMethod(), 
                handler.newInstance(), 
                context, zone, buddy);
    }
911737
private TimerTask getTimerTask() {
    final TimeBasedReportingMetric<T> lockObject = this;
    final TimerTask recurringReporting = new TimerTask() {
      @Override
      public void run() {
        synchronized (lockObject) {
          preTrackingEventMethod();
          notifyManager();
          postTrackingEventMethod();
        }
      }
    };
    return recurringReporting;
  }
1129863
public static boolean isMonitorNotify(String methodName, String methodSig) {
        return ("notify".equals(methodName) || "notifyAll".equals(methodName)) && "()V".equals(methodSig);
    }