Calls beforeMaterialization on all registered listeners in the reverse
order of registration.
964425
protected void beforeMaterialization()
	{
		if (_listeners != null)
		{
			MaterializationListener listener;

			for (int idx = _listeners.size() - 1; idx >= 0; idx--)
			{
				listener = (MaterializationListener) _listeners.get(idx);
				listener.beforeMaterialization(this, _id);
			}
		}
	}
805735
function (listener,prepend)
		{
			if ('function' !== typeof listener)
				return false;

			if (!_listeners)
				_listeners=listener;
			else if (typeof _listeners == 'object')
			{
				if (!prepend)
					_listeners.push(listener);
				else
					_listeners.unshift(listener);
			} else
			{
				if (!prepend)
					_listeners = [_listeners,listener];
				else
					_listeners = [listener,_listeners];
			}
			return this;
        }
534814
protected void prepareSimpleCleaningApproachScripts()
   {
      cleaningScripts.addAll(getFKRemovingScripts());
      cleaningScripts.addAll(getSingleDbWorkspaceCleaningScripts());

      committingScripts.addAll(getFKAddingScripts());

      rollbackingScripts.addAll(getFKAddingScripts());
   }
1009850
private void processInternalListeners() {
    List<Class<?>> internalListeners = getAllInternalListeners();
    for (Class<?> internalListener : internalListeners) {
      processInternalListener(internalListener);
    }
  }
1211681
def _callbackPlaceFillOrders(self, d):
        
        if isinstance(d, FilledOrder):
            self.onOrderMatched(d)
        elif isinstance(d, Order):
            self.onOrderPlaced(d)
        elif isinstance(d, UpdateCallOrder):
            self.onUpdateCallOrder(d)
        else:
            pass
778667
public static void beforeCompletion(TransactionImpl tran, int syncLevel) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "beforeCompletion", new Object[] { tran, syncLevel });

        if (syncLevel >= 0) {
            final ArrayList syncs = _syncLevels.get(syncLevel);

            if (syncs != null) {
                final int localID = (int) tran.getLocalTID();
                final byte[] globalID = tran.getTID();
                final int numSyncs = syncs.size();

                for (int s = 0; s < numSyncs; s++) {
                    ((SynchronizationCallback) syncs.get(s)).beforeCompletion(localID, globalID);
                    // exception here means rollback
                }
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "beforeCompletion");
    }
1090246
protected void postInit() {
        Collection<TrainingListener> oldListeners = new ArrayList<>();
        Collection<TrainingListener> replicatedListeners = new ArrayList<>();

        if (parallelWrapper.getListeners() != null) {
            oldListeners.addAll(parallelWrapper.getListeners());
        }
        configureListeners(uuid, oldListeners, replicatedListeners);

        this.replicatedModel.setListeners(replicatedListeners);
    }
1142653
def _cleanup(self):
        '''
        
        '''
        self._pending_consumers = None
        self._consumer_cb = None
        self._get_cb = None
        self._recover_cb = None
        self._cancel_cb = None
        self._return_listener = None
        super(BasicClass, self)._cleanup()
1338055
public void removePrefetchingListeners()
    {
        if (prefetchingListeners != null)
        {
            for (Iterator it = prefetchingListeners.iterator(); it.hasNext(); )
            {
                PBPrefetchingListener listener = (PBPrefetchingListener) it.next();
                listener.removeThisListener();
            }
            prefetchingListeners.clear();
        }
    }
542142
function() {
		gui.Plugin.prototype.ondestruct.call(this);
		gui.Object.each(this._trackedtypes, function(type, list) {
			list.slice().forEach(function(checks) {
				this._cleanup(type, checks);
			}, this);
		}, this);
	}
960789
private void processExternalListener(Class<?> listenerClass) {
    ExternalListenerMetadata listenerMetadata = ExternalListenerIntrospector
        .introspect(listenerClass);
    Map<CallbackType, Method> callbacks = listenerMetadata.getCallbacks();
    if (callbacks != null) {
      for (Map.Entry<CallbackType, Method> entry : callbacks.entrySet()) {
        validateExternalCallback(entry.getValue(), entry.getKey());
      }
    }
  }
942370
void notifyAndClearListeners() {
    if (!canBeCancelled()) {
      return;
    }
    ArrayList<ExecutableListener> tmpListeners;
    synchronized (this) {
      if (listeners == null) {
        return;
      }
      tmpListeners = listeners;
      listeners = null;
    }
    // Deliver events to non-child context listeners before we notify child contexts. We do this
    // to cancel higher level units of work before child units. This allows for a better error
    // handling paradigm where the higher level unit of work knows it is cancelled and so can
    // ignore errors that bubble up as a result of cancellation of lower level units.
    for (int i = 0; i < tmpListeners.size(); i++) {
      if (!(tmpListeners.get(i).listener instanceof ParentListener)) {
        tmpListeners.get(i).deliver();
      }
    }
    for (int i = 0; i < tmpListeners.size(); i++) {
      if (tmpListeners.get(i).listener instanceof ParentListener) {
        tmpListeners.get(i).deliver();
      }
    }
    if (cancellableAncestor != null) {
      cancellableAncestor.removeListener(parentListener);
    }
  }
1253732
function () {
    var callbacks = this._callbacks;
    var contexts = this._contexts;
    if (callbacks) {
      !(callbacks.length === contexts.length) ? "development" !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
      this._callbacks = null;
      this._contexts = null;
      for (var i = 0; i < callbacks.length; i++) {
        callbacks[i].call(contexts[i]);
      }
      callbacks.length = 0;
      contexts.length = 0;
    }
  }
1032144
function() {
      this.listenTo(this.view, 'initialize:complete', this.__augmentViewPrepare);
      this.listenTo(this.view, 'before-dispose-callback', this.__dispose);
      _.each(eventMap, function(callback, event) {
        this.listenTo(this.view, event, this[callback]);
      }, this);
    }
540739
public void revert() {
		for (Iterator i = listeners.iterator(); i.hasNext();) {
			((CommitTriggerListener) i.next()).revert();
		}
	}
522474
private <T> void deferNotification(T event, final EventMetadata metadata, final ObserverMethod<? super T> observer,
            final List<DeferredEventNotification<?>> notifications) {
        TransactionPhase transactionPhase = observer.getTransactionPhase();
        boolean before = transactionPhase.equals(TransactionPhase.BEFORE_COMPLETION);
        Status status = Status.valueOf(transactionPhase);
        notifications.add(new DeferredEventNotification<T>(contextId, event, metadata, observer, currentEventMetadata, status, before));
    }
1332904
private void doNotifyListeners(R oldValue, R newValue) {
        List<ValueChangeListener<R>> listenersCopy = new ArrayList<ValueChangeListener<R>>(listeners);
        notifyingListeners = true;
        for (ValueChangeListener<R> listener : listenersCopy) {
            listener.valueChanged(this, oldValue, newValue);
        }
        notifyingListeners = false;
    }