When a body loses channel membership, this method should be called so that any server that
happens to be hosting that channel can be told that the body in question is now a
participant.
434375
@AnyThread
    public void bodyRemovedFromChannel (ChatChannel channel, final int bodyId)
    {
        _peerMan.invokeNodeAction(new ChannelAction(channel) {
            @Override protected void execute () {
                ChannelInfo info = _channelMan._channels.get(_channel);
                if (info != null) {
                    info.participants.remove(bodyId);
                } else if (_channelMan._resolving.containsKey(_channel)) {
                    log.warning("Oh for fuck's sake, distributed systems are complicated",
                                "channel", _channel);
                }
            }
        });
    }
1167367
void fireMemberRemoved(AsteriskQueueMemberImpl member)
    {
        synchronized (listeners)
        {
            for (AsteriskQueueListener listener : listeners)
            {
                try
                {
                    listener.onMemberRemoved(member);
                }
                catch (Exception e)
                {
                    logger.warn("Exception in onMemberRemoved()", e);
                }
            }
        }
    }
1330933
function Session_delChannel(channel) {
  var index = this.channels.indexOf(channel)
  if (-1 == index) return

  this.channels.splice(index, 1)
}
1356245
@Handler(channels = Self.class)
    public void onRegistered(NioRegistration.Completed event)
            throws InterruptedException, IOException {
        NioHandler handler = event.event().handler();
        if (handler == this) {
            if (event.event().get() == null) {
                fire(new Error(event,
                    "Registration failed, no NioDispatcher?"));
                return;
            }
            registration = event.event().get();
            purger = new Purger();
            purger.start();
            fire(new Ready(serverSocketChannel.getLocalAddress()));
            return;
        }
        if (handler instanceof TcpChannelImpl) {
            TcpChannelImpl channel = (TcpChannelImpl) handler;
            channel.downPipeline()
                .fire(new Accepted(channel.nioChannel().getLocalAddress(),
                    channel.nioChannel().getRemoteAddress(), false,
                    Collections.emptyList()), channel);
            channel.registrationComplete(event.event());
        }
    }
228281
def add_subscriber_to_channel(channel, message)
      registry_channels = CelluloidPubsub::Registry.channels
      @channels << channel
      registry_channels << channel unless registry_channels.include?(channel)
      @server.mutex.synchronize do
        @server.subscribers[channel] = channel_subscribers(channel).push(reactor: Actor.current, message: message)
      end
    end
1327691
def connection_lost(self, exc):
        """"""
        if exc is None:
            self.log.warning('eof from receiver?')
        else:
            self.log.warning('Lost connection to receiver: %s', exc)

        self.transport = None

        if self._connection_lost_callback:
            self._loop.call_soon(self._connection_lost_callback)
160681
protected void doSubscribe(javax.servlet.sip.SipServletRequest req) throws javax.servlet.ServletException, java.io.IOException{
    	if (req.isInitial())
			notImplemented(req);
    }
1106714
def broadcast_channel(self, message, channel=None):
        
        if channel is None:
            channels = self.channels
        else:
            channels = [channel]
        for channel in channels:
            for subscriber in CHANNELS[channel]:
                if subscriber != self.socket.session.session_id:
                    session = self.socket.handler.server.sessions[subscriber]
                    self._write(message, session)
23211
def delete_server_subscribers(channel)
      @server.mutex.synchronize do
        (@server.subscribers[channel] || []).delete_if do |hash|
          hash[:reactor] == Actor.current
        end
      end
    end
1259163
def need_rejoin(self):
        
        if not self._subscription.partitions_auto_assigned():
            return False

        if self._auto_assign_all_partitions():
            return False

        # we need to rejoin if we performed the assignment and metadata has changed
        if (self._assignment_snapshot is not None
            and self._assignment_snapshot != self._metadata_snapshot):
            return True

        # we need to join if our subscription has changed since the last join
        if (self._joined_subscription is not None
            and self._joined_subscription != self._subscription.subscription):
            return True

        return super(ConsumerCoordinator, self).need_rejoin()
1116040
def move(user, channel)
      API::Server.update_member(@bot.token, @id, user.resolve_id, channel_id: channel.resolve_id)
    end
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);
        }
    }
188591
private void onMembershipChange(ClusterMembershipEvent event) {
    if (event.type() == ClusterMembershipEvent.Type.MEMBER_REMOVED) {
      recoverTransactions(transactions.entrySet().iterator(), event.subject().id());
    }
  }
1220066
def sendUserInvitationRevoked(self, context={}):
    
    organization, invited, invitator = context['invite'].organization, context['invite'].invited, context['invite'].invitator
    # invited user email
    self.__init__(organization, async_mail=self.async_mail, override_receiver=invited.email, locale=invited.locale)
    self.sendEmail('userInvitedRevoked-toUser', 'Your invitation to an organization has been revoked', context)

    if organization.owner == invitator:
      self.__init__(organization, async_mail=self.async_mail, override_receiver=organization.owner.email, locale=organization.owner.locale)
      self.sendEmail('userInvitedRevoked-toOwnerInviter', 'You have revoked an user invitation', context)
    else:
      self.__init__(organization, async_mail=self.async_mail, override_receiver=organization.owner.email, locale=organization.owner.locale)
      self.sendEmail('userInvitedRevoked-toOwner', 'An invitation to join your organization has been revoked', context)

      self.__init__(organization, async_mail=self.async_mail, override_receiver=invitator.email, locale=invitator.locale)
      self.sendEmail('userInvitedRevoked-toMemberInviter', 'You have revoked an user invitation', context)
933516
def call
      return broadcast(:invalid) if membership.blank?
      return broadcast(:invalid) if membership.role != "member"
      return broadcast(:invalid) if membership.user_group != user_group

      transaction do
        promote_membership
        send_notification
      end

      broadcast(:ok)
    end
225392
async def on_shutdown(self):
        
        await self._unregister_subscriptions()

        self._accepting = False

        for (ws, _) in self._subscribers:
            await ws.close(code=aiohttp.WSCloseCode.GOING_AWAY,
                           message='Server shutdown')
411802
def deregister(self, subscriber):
        """"""
        try:
            logger.debug('Subscriber left')
            self.subscribers.remove(subscriber)
        except KeyError:
            logger.debug(
                'Error removing subscriber: ' +
                str(subscriber))