/** * Callback used to receive notifications from the {@link RootMetricContext}. */ private void notificationCallback(Notification notification) { if (notification instanceof MetricContextCleanupNotification) { removedMetricContext(((MetricContextCleanupNotification) notification).getMetricContext()); } if (notification instanceof NewMetricContextNotification) { newMetricContext(((NewMetricContextNotification) notification).getMetricContext()); } }
/** * Callback used to receive notifications from the {@link RootMetricContext}. */ private void notificationCallback(Notification notification) { if (notification instanceof MetricContextCleanupNotification) { removedMetricContext(((MetricContextCleanupNotification) notification).getMetricContext()); } if (notification instanceof NewMetricContextNotification) { newMetricContext(((NewMetricContextNotification) notification).getMetricContext()); } }