event is retried
966164
function(values) {
          if (values.length < 3) {
            logger.tracef("Not enough to read (not array): %s", values);
            return undefined;
          }

          return {listenerId: values[0], isCustom: values[1] == 1, isRetried: values[2] == 1}
        }
1235277
function(err)
  {
    // if we have a result stream, stop listening to events on it
    if (resultStream)
    {
      resultStream.removeListener('data', onResultStreamData);
      resultStream.removeListener('close', onResultStreamClose);
    }

    // we're done, so time to clean up
    rowBuffer = null;
    rowIndex = 0;
    resultStream = null;
    numResultStreamInterrupts = 0;

    if (err)
    {
      emitError(err);
    }
    else
    {
      self.push(null);
    }
  }
681073
private void processChildEvent(WatchedEvent event) throws Exception {
        HashMap<Integer, LeaderCallBackInfo> cacheCopy = new HashMap<Integer, LeaderCallBackInfo>(m_publicCache);
        ByteArrayCallback cb = new ByteArrayCallback();
        m_zk.getData(event.getPath(), m_childWatch, cb, null);
        try {
            // cb.getData() and cb.getPath() throw KeeperException
            byte payload[] = cb.get();
            String data = new String(payload, "UTF-8");
            LeaderCallBackInfo info = LeaderCache.buildLeaderCallbackFromString(data);
            Integer partitionId = getPartitionIdFromZKPath(cb.getPath());
            cacheCopy.put(partitionId, info);
        } catch (KeeperException.NoNodeException e) {
            // rtb: I think result's path is the same as cb.getPath()?
            Integer partitionId = getPartitionIdFromZKPath(event.getPath());
            cacheCopy.remove(partitionId);
        }
        m_publicCache = ImmutableMap.copyOf(cacheCopy);
        if (m_cb != null) {
            m_cb.run(m_publicCache);
        }
    }
358981
public void eventRestored() throws SevereMessageStoreException {
    super.eventRestored();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "eventRestored");
    try {
      NonLockingCursor cursor = newNonLockingItemCursor(null);
      AbstractItem item = cursor.next();
      while (item != null) {
        if (item instanceof SchemaStoreItem) {
          addToIndex((SchemaStoreItem)item);
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "JSchema found in store: " + ((SchemaStoreItem)item).getSchema().getID());
        }
        item = cursor.next();
      }
    } catch (MessageStoreException e) {
      FFDCFilter.processException(e, "eventRestored", "108", this);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "eventRestored");
  }
722230
private void handleClusterEvent(ClusterMembershipEvent event) {
    raft.getThreadContext().execute(() -> {
      if (event.type() == ClusterMembershipEvent.Type.MEMBER_REMOVED) {
        log.debug("Node {} deactivated", event.subject().id());
        raft.getSessions().getSessions().stream()
            .filter(session -> session.memberId().equals(event.subject().id()))
            .forEach(this::expireSession);
      }
    });
  }
188591
private void onMembershipChange(ClusterMembershipEvent event) {
    if (event.type() == ClusterMembershipEvent.Type.MEMBER_REMOVED) {
      recoverTransactions(transactions.entrySet().iterator(), event.subject().id());
    }
  }
120099
def re(self, event_property, value):
        
        c = self.copy()
        c.filters.append(filters.RE(event_property, value))
        return c
197538
protected void processEvent (DEvent event)
    {
        // look up the target object
        DObject target = _objects.get(event.getTargetOid());
        if (target == null) {
            log.debug("Event target no longer exists", "event", event);
            return;
        }

        // check the event's permissions
        if (!target.checkPermissions(event)) {
            log.warning("Event failed permissions check", "event", event, "target", target);
            return;
        }

        if (dispatchEvent(event, target)) {
            // unless requested not to, notify any proxies
            target.notifyProxies(event);
        }
    }
418298
void removeEvent(EventId eventId) throws Exception {
		this.eventsBufferCache.remove(eventId);
		this.eventsBuffer.remove(eventId);
	}
1252523
@SuppressWarnings("unused")
    private void discard(IRTMPEvent event) {
        if (event instanceof IStreamData<?>) {
            log.debug("Discarding: {}", ((IStreamData<?>) event).toString());
            IoBuffer data = ((IStreamData<?>) event).getData();
            if (data != null) {
                log.trace("Freeing discarded event data");
                data.free();
                data = null;
            }
        }
        event.setHeader(null);
    }
1348231
function(){

	    console.log('reached end of batch');
	    if( came_back_too_fasts.length > 0 ){

		console.log('retry too fasts...');

		us.each(came_back_too_fasts, function(acc){
		    console.log('retry: ' + acc);
		    
		    var lbl = jQuery('#' + bid).jstree(true).get_text(acc);
		    if( ! lbl ){
			console.log('give up, still not there: ' + acc);
		    }else{

			lbl = lbl.slice(0, lbl.indexOf(' <span'));
			jQuery('#' + bid).jstree(true).set_text(acc,lbl + id_to_badge_text[acc]);
		    }
		});
	    }
        }
578445
@Override
    public void eventRestored() throws SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "eventRestored");
        super.eventRestored();
        // After a restart, if the referredItem is not obtained before a postCommit
        // then the item can not be obtained. Therefore we need to always obtain
        // the item (msgstore recreate their links in the following method).
        // Defect 302341
        getMessageItem();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "eventRestored");
    }
1101932
def _getEventsOnDay(self, request, day):
        """"""
        return getAllEventsByDay(request, day, day, home=self)[0]
12965
private void handleLeaveEvent(Node node) {
    SwimMember member = members.get(MemberId.from(node.id().id()));
    if (member != null && !member.isActive()) {
      members.remove(member.id());
    }
  }
403723
private QYBaseRespMsg processEventHandle(QYBaseEvent event){
        if(CollectionUtil.isEmpty(eventHandles)){
            synchronized (LOCK){
                eventHandles = this.initEventHandles();
            }
        }
        if(CollectionUtil.isNotEmpty(eventHandles)){
            for(QYEventHandle eventHandle : eventHandles){
                QYBaseRespMsg resultMsg = null;
                boolean result;
                try{
                    result = eventHandle.beforeHandle(event);
                }catch (Exception e){
                    result = false;
                }
                if(result){
                    resultMsg = eventHandle.handle(event);
                }
                if(BeanUtil.nonNull(resultMsg)){
                    return resultMsg;
                }
            }
        }
        return null;
    }
701895
public void processEvent(EventObject event) {
    if (event instanceof RequestEvent) {
      processRequestEvent((RequestEvent) event);
    } else {
      LOG.error("invalid event type received: " + event.getClass().getName() + ": "
          + event.toString());
    }
  }
96888
def _getEventFromUid(self, request, uid):
        """"""
        event = getEventFromUid(request, uid) # might raise ObjectDoesNotExist
        home = request.site.root_page
        if event.get_ancestors().filter(id=home.id).exists():
            # only return event if it is in the same site
            return event