Process a list with event
@param symbol
@param ticksArray
194560
public void handleEventsCollection(final S symbol, final Collection<T> elements) {
		
		final List<BiConsumer<S, T>> callbackList = callbacks.get(symbol);
		
		if(callbackList == null) {
			return;
		}
				
		if(callbackList.isEmpty()) {
			return;
		}
		
		// Notify callbacks synchronously, to preserve the order of events
		for (final T element : elements) {
			callbackList.forEach((c) -> {
				c.accept(symbol, element);
			});
		}
510315
function(message) {
        if (!this._tickList) {
            this._tickList = [];
            while (this._tickList.length < this._maxTicks) {
                this._tickList.push(0);
            }
        }

        if (!this._lastHeart) {
            this._lastHeart = Date.now();
            this._lastFpsUpdate = this._lastHeart;
            return;
        }

        var newHeart = Date.now();
        var newTick = newHeart - this._lastHeart;
        this._lastHeart = newHeart;

        this._tickSum -= this._tickList[this._tickIndex];
        this._tickSum += newTick;
        this._tickList[this._tickIndex] = newTick;
        if (++this._tickIndex == this._maxTicks) {
            this._tickIndex = 0;
        }
    }
116036
public void processNack(ControlNack nm)
    throws SIResourceException
  {
    if (tc.isEntryEnabled())
          SibTr.entry(tc, "processNack", nm);
 
    long startstamp = nm.getStartTick();
    long endstamp = nm.getEndTick();

    synchronized (this)
    {
      // the following steps are performed:
      // (1) check ticks in Unknown
      // (2) create nacks when appropriate
      // (3) change Unknown ticks to Requested
      // (4) send nacks.

      iststream.setCursor(startstamp);
      boolean changed = false;
      TickRange tr = iststream.getNext();
      TickRange tr2;

      do
      {
        // look at each TickRange individually
        // and send nacks for ranges that are not already in Requested state
        if (tr.type == TickRange.Unknown)
        {
          changed = true;
          long maxStartstamp = max(tr.startstamp, startstamp);
          long minEndstamp = min(tr.endstamp, endstamp);
        
          upControl.sendNackMessage(null, null, null, maxStartstamp, minEndstamp, priority, reliability, streamID);
        }

        tr2 = tr;
        tr = iststream.getNext();
      }
      while ((tr.startstamp <= endstamp) && (tr2 != tr));

      if (changed)
      {
        // update the stream to Requested
        tr = new TickRange(TickRange.Requested, startstamp, endstamp);
        iststream.writeRange(tr);

        // start a timer to forget this Request 
        new ReqExpiryHandle(tr);
      }

    } // end synchronized (this)
   
    if (tc.isEntryEnabled())
      SibTr.exit(tc, "processNack");
  }
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;
    }
49616
@Override protected void handleEvents(final String EVENT_TYPE) {
        super.handleEvents(EVENT_TYPE);
        if ("RECALC".equals(EVENT_TYPE)) {
            range     = gauge.getRange();
            angleStep = ANGLE_RANGE / range;
            minValue  = gauge.getMinValue();
            sections  = gauge.getSections();
            resize();
            redraw();
            setBar(gauge.getCurrentValue());
        } else if ("VISIBILITY".equals(EVENT_TYPE)) {
            Helper.enableNode(valueText, gauge.isValueVisible());
            Helper.enableNode(titleText, !gauge.getTitle().isEmpty());
            Helper.enableNode(unitText, !gauge.getUnit().isEmpty());
            boolean tickLabelsVisible = gauge.getTickLabelsVisible();
            Helper.enableNode(minText, tickLabelsVisible);
            Helper.enableNode(maxText, tickLabelsVisible);
            boolean thresholdVisible = gauge.isThresholdVisible();
            Helper.enableNode(threshold, thresholdVisible);
            Helper.enableNode(thresholdText, thresholdVisible);
            resize();
            redraw();
        }
    }
1276861
@Override protected void handleEvents(final String EVENT_TYPE) {
        if ("RESIZE".equals(EVENT_TYPE)) {
            resize();
            redraw();
        } else if ("REDRAW".equals(EVENT_TYPE)) {
            redraw();
        } else if ("RECALC".equals(EVENT_TYPE)) {
            minValue  = gauge.getMinValue();
            range     = gauge.getRange();
            angleStep = ANGLE_RANGE / range;
            redraw();
            setBar(gauge.getCurrentValue());
        } else if ("VISIBILITY".equals(EVENT_TYPE)) {
            Helper.enableNode(valueText, gauge.isValueVisible());
            Helper.enableNode(unitText, !gauge.getUnit().isEmpty());
        }
    }
1298928
public static <S, T extends Event, U extends T> InputMapTemplate<S, U> process(
            EventPattern<? super T, ? extends U> eventPattern,
            BiFunction<? super S, ? super U, InputHandler.Result> action) {
        return new PatternActionTemplate<>(eventPattern, action);
    }
1296041
function process(list) {
        var head = list[0];
        var tail = list.slice(1);
        // @TODO Handle null head (all handlers emitted "reject")
        req.once("reject", function () {
            process(tail);
        });
        head.request(req, res);
    }
1144005
private void processEventParameter(Expression expression, NameExpr nameExpr,
      List<VariableInfo> parameters) {
    Optional<Node> parentNode = nameExpr.getParentNode();
    if (parentNode.isPresent() && parentNode.get() instanceof CastExpr) {
      CastExpr castExpr = (CastExpr) parentNode.get();
      parameters.add(new VariableInfo(castExpr.getType().toString(), "$event"));
    } else {
      logger.error(
          "\"$event\" should always be casted to it's intended type. Example: @click=\"doSomething((Event) $event)\".",
          expression.toString());
    }
  }
568337
public void setListSymbol(Chunk symbol) {
    	if (this.symbol == null) {
    		this.symbol = symbol;
    		if (this.symbol.getFont().isStandardFont()) {
    			this.symbol.setFont(font);
    		}
    	}
    }
1034840
public void processTimedoutEntries(List timedout)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "processTimedoutEntries", new Object[] {this,timedout});

    boolean sendMsg = false;
    synchronized (this)
    {
      if (active && completedTicksInitialized && !timedout.isEmpty())
      {
        sendMsg = true;
      }
    }
    if (sendMsg)
      parent.sendDecisionExpected(remoteMEUuid, gatheringTargetDestUuid, streamId, timedout);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "processTimedoutEntries");
  }
370263
public void synchronize(List<? extends E> list) {
		assert SwingUtilities.isEventDispatchThread() : ApplicationResources.accessor.getMessage("assert.notRunningInSwingEventThread");

		// Make sure the first element exists and matches
		int modelOffset;
		if(constantFirstRow!=null) {
			modelOffset = 1;
			if(getSize()==0) addElement(constantFirstRow);
			else if(!getElementAt(0).equals(constantFirstRow)) {
				insertElementAt(constantFirstRow, 0);
			}
		} else modelOffset = 0;

		// Synchronize the dynamic part of the list
		int size = list.size();
		for(int index=0; index<size; index++) {
			E obj = list.get(index);
			if(index>=(getSize()-modelOffset)) addElement(obj);
			else if(!obj.equals(getElementAt(index+modelOffset))) {
				// Objects don't match
				// If this object is found further down the list, then delete up to that object
				int foundIndex = -1;
				for(int searchIndex = index+1; searchIndex<(getSize()-modelOffset); searchIndex++) {
					if(obj.equals(getElementAt(searchIndex+modelOffset))) {
						foundIndex = searchIndex;
						break;
					}
				}
				if(foundIndex!=-1) {
					// No removeRange
					// removeRange(index+modelOffset, foundIndex-1+modelOffset);
					for(
						int removeIndex = foundIndex-1+modelOffset, end = index+modelOffset;
						removeIndex>=end;
						removeIndex--
					) removeElementAt(removeIndex);
				} else {
					// Otherwise, insert in the current index
					insertElementAt(obj, index+modelOffset);
				}
			}
		}
		// Remove any extra
		while((getSize()-modelOffset) > size) removeElementAt(getSize()-1);
	}
929999
public static void releaseBufferArray(WsByteBuffer[] list) {
        if (null == list) {
            return;
        }
        for (int i = 0; i < list.length; i++) {
            if (null != list[i]) {
                list[i].release();
                list[i] = null;
            }
        }
    }
371578
function enqueueEvent( self, eventItem ) {
   if( self.eventQueue_.length === 0 ) {
      self.nextTick_( () => {
         const queuedEvents = self.eventQueue_;

         self.eventQueue_ = [];

         processWaitingPublishPromises( self, processQueue( self, queuedEvents ) );
      } );
   }
   self.eventQueue_.push( eventItem );
}
719433
private ISyntaxElement processXMLEvent(XMLEvent event, Stack<IElementParser> parsersStack) throws ModelException
    {
        for (IElementParser parser : parsers)
        {
            if (parser.canParse(event))
            {
                IElementParser newParser = parser.createNewInstance();
                ISyntaxElement parsedElement = newParser.parse(event);
                if (!parsersStack.empty())
                {
                    parsersStack.peek().assignParsedElement(newParser.name(), parsedElement);
                }
                if (event.isStartElement())
                {
                    parsersStack.push(newParser);
                }
                return parsedElement;
            }
        }
        return null;
    }
906125
@Override
    protected void processMouseEvent (MouseEvent event)
    {
        event.translatePoint(_vbounds.x, _vbounds.y);
        super.processMouseEvent(event);
    }
897644
public void processAckExpected(long stamp)
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "processAckExpected", new Object[] { new Long(stamp)});

    synchronized (this)
    {
      // Send Ack message for ticks up to iack
      sendAck();

      // Send Nack message for ticks between iack and stamp
      if (stamp > iack)
      {
        try
        {
          upControl.sendNackMessage(
            null,
            null,
            null,
            iack+1,
            stamp,
            priority,
            reliability,
            streamID);
        }
        catch (SIResourceException e)
        {
          // FFDC
          FFDCFilter.processException(
            e,
            "com.ibm.ws.sib.processor.gd.InternalInputStream.processAckExpected",
            "1:379:1.42",
            this);

          SibTr.exception(tc, e);
          SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
            new Object[] {
              "com.ibm.ws.sib.processor.gd.InternalInputStream",
              "1:386:1.42",
              e });

          if (tc.isEntryEnabled())
            SibTr.exit(tc, "processAckExpected", e);

          throw new SIErrorException(
            nls.getFormattedMessage(
             "INTERNAL_MESSAGING_ERROR_CWSIP0002",
             new Object[] {
               "com.ibm.ws.sib.processor.gd.InternalInputStream",
               "1:397:1.42",
               e },
             null),
            e);
        }   
      }
    }

    if (tc.isEntryEnabled())
      SibTr.exit(tc, "processAckExpected");
  }