Notifies all registered listener that a member has been added to the queue.

@param member added to the queue
552935
void fireMemberAdded(AsteriskQueueMemberImpl member)
    {
        synchronized (listeners)
        {
            for (AsteriskQueueListener listener : listeners)
            {
                try
                {
                    listener.onMemberAdded(member);
                }
                catch (Exception e)
                {
                    logger.warn("Exception in onMemberAdded()", e);
                }
            }
        }
    }
65823
public void addMember(JsonNode member) {
        User user = api.getOrCreateUser(member.get("user"));
        members.put(user.getId(), user);
        if (member.hasNonNull("nick")) {
            nicknames.put(user.getId(), member.get("nick").asText());
        }
        if (member.hasNonNull("mute")) {
            setMuted(user.getId(), member.get("mute").asBoolean());
        }
        if (member.hasNonNull("deaf")) {
            setDeafened(user.getId(), member.get("deaf").asBoolean());
        }

        for (JsonNode roleIds : member.get("roles")) {
            long roleId = Long.parseLong(roleIds.asText());
            getRoleById(roleId).map(role -> ((RoleImpl) role)).ifPresent(role -> role.addUserToCache(user));
        }

        joinedAtTimestamps.put(user.getId(), OffsetDateTime.parse(member.get("joined_at").asText()).toInstant());

        synchronized (readyConsumers) {
            if (!ready && members.size() == getMemberCount()) {
                ready = true;
                readyConsumers.forEach(consumer -> consumer.accept(this));
                readyConsumers.clear();
            }
        }
    }
1248037
public boolean addMember (FormationMember<T> member) {
		// Find out how many slots we have occupied
		int occupiedSlots = slotAssignments.size;

		// Check if the pattern supports one more slot
		if (pattern.supportsSlots(occupiedSlots + 1)) {
			// Add a new slot assignment
			slotAssignments.add(new SlotAssignment<T>(member, occupiedSlots));

			// Update the slot assignments and return success
			updateSlotAssignments();
			return true;
		}

		return false;
	}
1045575
public void add(Listener listener) {
        logger.trace("Adding listener [{}]", listener);
        synchronized (listeners) {
            listeners.add(listener);
        }
    }
799465
@Override
    final public void addConnectionEventListener(
                                                 final ConnectionEventListener listener) {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, "addConnectionEventListener", listener);
        }

        synchronized (_connectionListeners) {
            _connectionListeners.add(listener);
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, "addConnectionEventListener");
        }

    }
749871
public final synchronized void addListener(EventListener l) {
        if(l ==null) {
            throw new IllegalArgumentException("Listener " + l +
                                               " is null");
        }
        if(listeners == EMPTY_LISTENERS) {
            listeners = new EventListener[1];
            listeners[0] = l;
        }
        else {
            int i = listeners.length;
            EventListener[] tmp = new EventListener[i+1];
            System.arraycopy(listeners, 0, tmp, 0, i);

            tmp[i] = l;
            listeners = tmp;
        }
    }
507797
public void addListener(EventListener l) {
        if (l == null) {
            throw new NullPointerException();
        }

        if (acceptsListener(l)) {
            synchronized (notifyLock) {
                if (listeners == null) {
                    listeners = new ArrayList<EventListener>();
                } else {
                    // identity equality check
                    for (EventListener ll : listeners) {
                        if (ll == l) {
                            return;
                        }
                    }
                }

                listeners.add(l);
            }
        } else {
            throw new IllegalStateException("Listener invalid for this notifier.");
        }
    }
344921
public synchronized void addListener(String threadPrefix,
			EventListener listener) {
		if (threadPrefix.trim().equals("")) {
			globalListeners.addElement(listener);
		} else {
			keyedListeners.put(threadPrefix.trim(), listener);
		}
	}
957676
public void addMemberHeader(ExecutableElement member, Content methodsContentTree) {
        methodsContentTree.addContent(getHead(member));
        methodsContentTree.addContent(getSignature(member));
    }
1072100
public void addConnectionListener(KNXListener l)
	{
		if (l == null)
			return;
		synchronized (listeners) {
			if (!listeners.contains(l)) {
				listeners.add(l);
				listenersCopy = new ArrayList(listeners);
			}
			else
				logger.warn("event listener already registered");
		}
	}
469472
private void onSuspend(final List<Address> members) {
        Message msg = null;
        Collection<Address> participantsInFlush = null;
      synchronized (sharedLock) {
         flushCoordinator = localAddress;         

         // start FLUSH only on group members that we need to flush
         participantsInFlush = members;
         participantsInFlush.retainAll(currentView.getMembers());
         flushMembers.clear();
         flushMembers.addAll(participantsInFlush);
         flushMembers.removeAll(suspected);
         
          msg = new Message(null).src(localAddress).setBuffer(marshal(participantsInFlush, null))
            .putHeader(this.id, new FlushHeader(FlushHeader.START_FLUSH, currentViewId()));

      }
        if (participantsInFlush.isEmpty()) {
            flush_promise.setResult(SUCCESS_START_FLUSH);
        } else {
            down_prot.down(msg);
            if (log.isDebugEnabled())
                log.debug(localAddress + ": flush coordinator "
                        + " is starting FLUSH with participants " + participantsInFlush);
        }
    }
1020247
public void addListener(GramJobListener listener) {
	if (listeners == null) listeners = new Vector();
	listeners.addElement(listener);
    }
1346315
public void addListener(LifecycleListener listener)
  {
    synchronized (this) {
      if (isDestroyed()) {
        IllegalStateException e = new IllegalStateException("attempted to add listener to a destroyed lifecyle " + this);

        if (_log != null)
          _log.log(Level.WARNING, e.toString(), e);
        else
          Logger.getLogger(Lifecycle.class.getName()).log(Level.WARNING, e.toString(), e);

        return;
      }

      if (_listeners == null)
        _listeners = new ArrayList<WeakReference<LifecycleListener>>();

      for (int i = _listeners.size() - 1; i >= 0; i--) {
        LifecycleListener oldListener = _listeners.get(i).get();

        if (listener == oldListener)
          return;
        else if (oldListener == null)
          _listeners.remove(i);
      }

      _listeners.add(new WeakReference<LifecycleListener>(listener));
    }
  }
537423
public void init(ListenerOwner owner)
    {
        m_owner = owner;
        m_nextListener = null;
        m_bEnabled = true;
        m_dependentListener = null;
        m_dependentStateListener = null;
        if (owner != null)
            owner.addListener(this);
    }
626094
public void addListener(BaseListener listener)
    {
        listener.setNextListener(null);  // Just being safe
        if ((this.getRecord() != null) && (this.getRecord().getTable() != null))
            this.getRecord().getTable().addListener((FieldListener)listener, this);   // Give the table a chance to clone this or whatever.
        else
            this.doAddListener((FieldListener)listener);
    }
1362797
public <T extends Widget & Checkable> boolean addOnCheckChangedListener
            (OnCheckChangedListener listener) {
        final boolean added;
        synchronized (mListeners) {
            added = mListeners.add(listener);
        }
        if (added) {
            List<T> c = getCheckableChildren();
            for (int i = 0; i < c.size(); ++i) {
                listener.onCheckChanged(this, c.get(i), i);
            }
        }
        return added;
    }
878840
public <T> void addListener(final Listener<T> listener, final Object instance) {
		final ListenerInstancePair<T> pair = new ListenerInstancePair<T>(listener, instance);
		this.listeners.add(pair);
		final Type observableType = GenericsUtil.getEntityGenericType(listener.getClass(), 0, Listener.class);
		final Class<?> observable = GenericsUtil.guessClazz(observableType);
		if (!this.cachedListeners.containsKey(observable)) {
			this.cachedListeners.put(observable, new LinkedList<ListenerInstancePair<?>>());
		}
		for (final Map.Entry<Class<?>, List<ListenerInstancePair<?>>> entry : this.cachedListeners.entrySet()) {
			final Class<?> type = entry.getKey();
			if (observable.isAssignableFrom(type)) {
				entry.getValue().add(pair);
			}
		}
	}