Handler for a batch:stop event to force
update of all registered links with jump over connector
@param {object} batchEvent optional object with info about batch
326607
function updateJumpOver() {
        var updateList = this._jumpOverUpdateList;
        for (var i = 0; i < updateList.length; i++) {
            updateList[i].update();
        }
    }
1332232
private void doBatchStart(final JsonObject message) {
    if (currentBatch != null) {
      currentBatch.handleEnd(null);
    }
    String batchID = message.getString("batch");
    Object args = deserializer.deserialize(message);
    if (log.isDebugEnabled()) {
      log.debug(String.format("%s - Batch started: Batch[batch=%s, args=%s]", this, batchID, args));
    }
    currentBatch = new DefaultConnectionInputBatch(batchID, this);
    if (batchHandler != null) {
      batchHandler.handle(currentBatch);
    }
    currentBatch.handleStart(args);
  }
744145
public void endBatchedUpdates() {
        if (mCallback instanceof BatchedCallback) {
            ((BatchedCallback) mCallback).dispatchLastEvent();
        }
        if (mCallback == mBatchedCallback) {
            mCallback = mBatchedCallback.mWrappedCallback;
        }
    }
192146
protected void checkForBatchSupport(Connection conn)
    {
        if (!m_batchUpdatesChecked)
        {
            DatabaseMetaData meta;
            try
            {
                meta = conn.getMetaData();
                m_supportsBatchUpdates = meta.supportsBatchUpdates();
            }
            catch (Throwable th)
            {
                log.info("Batch support check failed", th);
                m_supportsBatchUpdates = false;
            }
            finally
            {
                m_batchUpdatesChecked = true;
            }
        }
    }
381514
function (ev) {
                // If the compute is no longer bound (because the same change event led to an unbind)
                // then do not call getValueAndBind, or we will leak bindings.
                if (computeState && !computeState.bound) {
                    return;
                }
                if (ev.batchNum === undefined || ev.batchNum !== batchNum) {
                    // store the old value
                    var oldValue = data.value,
                        // get the new value
                        newvalue = getValueAndBind();
                    // update the value reference (in case someone reads)
                    data.value = newvalue;
                    // if a change happened
                    if (newvalue !== oldValue) {
                        callback(newvalue, oldValue);
                    }
                    batchNum = batchNum = ev.batchNum;
                }


            }
566182
function executeDispatch(event, listener, inst) {
  var type = event.type || 'unknown-event';
  event.currentTarget = getNodeFromInstance(inst);
  invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
  event.currentTarget = null;
}
28163
private void runBatchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_runBatchButtonActionPerformed
        // Perform batch encoding
        String thisData = "";
        String extension;
        String fullFileName;
        String outputCount;
        int inputCount = 0;
        String errorLog;
        String progressLog = "";
        int i, k;
        int lineCount = 0;
        double percentage;
        int countLength, currentLength;

        errorLog = "Starting batch process..." + '\n';
        batchOutputArea.setText(errorLog);

        switch(outFormatCombo.getSelectedIndex()) {
            case 0:
                extension = ".png";
                break;
            case 1:
                extension = ".jpg";
                break;
            case 2:
                extension = ".gif";
                break;
            case 3:
                extension = ".bmp";
                break;
            case 4:
                extension = ".svg";
                break;
            case 5:
            default:
                extension = ".eps";
                break;
        }

        for(i = 0; i < sequenceArea.getText().length(); i++) {
            if (sequenceArea.getText().charAt(i) == '\n') {
                inputCount++;
            }
        }

        countLength = Integer.toString(inputCount + 1).length();

        for(i = 0; i < sequenceArea.getText().length(); i++) {
            if (sequenceArea.getText().charAt(i) == '\n') {
                currentLength = Integer.toString(lineCount + 1).length();
                outputCount = "";
                for (k = 0; k < (countLength - currentLength); k++) {
                    // Add leading zeroes to file name
                    outputCount += "0";
                }
                outputCount += Integer.toString(lineCount + 1);
                if (!thisData.equals("")) {
                    if (outFilenameCombo.getSelectedIndex() == 0) {
                        fullFileName = folderField.getText() + prefixField.getText()
                            + osFriendly(thisData) + extension;
                    } else {
                        fullFileName = folderField.getText()
                                + prefixField.getText() + outputCount + extension;
                    }
                    File file = new File(fullFileName);
                    SaveSymbol saveSymbol = new SaveSymbol();

                    saveSymbol.removeAll();

                    saveSymbol.setSize(saveSymbol.getPreferredSize());
                    saveSymbol.setBorder(BorderFactory.createEmptyBorder());
                    saveSymbol.setBackground(paperColour);
                    try {
                        SaveImage saveImage = new SaveImage();
                        if (errorLabel.getText().isEmpty()) {
                            saveImage.save(file, saveSymbol);
                        } else {
                            errorLog += errorLabel.getText() + " at line " + (lineCount + 1) + '\n';
                        }
                    } catch (IOException e) {
                        errorLog += "I/O exception writing to " + fullFileName
                                + " at line " + (lineCount + 1) + ": " + e.getMessage() + '\n';
                    }
                }
                lineCount++;
                percentage = (double)(lineCount) / (double)(inputCount);
                percentage *= 100;
                progressLog = "Completed line " + lineCount + " of "
                        + inputCount + " (" + (int)(percentage) + "% done)";
                batchOutputArea.setText(errorLog + progressLog);
                thisData = "";
            } else {
                char currentChar = sequenceArea.getText().charAt(i);

                if ((currentChar != 0x0D) && (currentChar != 0x0A)) {
                    thisData += sequenceArea.getText().charAt(i);
                }
            }
        }
        progressLog += '\n' + "Finished!";
        batchOutputArea.setText(errorLog + progressLog);
    }
790447
def _handle_event(self, connection, event):
        
        with self.mutex:
            matching_handlers = sorted(
                self.handlers.get("all_events", [])
                + self.handlers.get(event.type, [])
            )
            for handler in matching_handlers:
                result = handler.callback(connection, event)
                if result == "NO MORE":
                    return
439897
function batchedUpdates(fn, a) {
    var previousIsBatchingUpdates = isBatchingUpdates;
    isBatchingUpdates = true;
    try {
      return fn(a);
    } finally {
      isBatchingUpdates = previousIsBatchingUpdates;
      if (!isBatchingUpdates && !isRendering) {
        performSyncWork();
      }
    }
  }
387188
function (batch, response) {
                var data = response.data;
                for (var i = 0, requestId; i < batch.length; i++) {
                    requestId = this._getRequestId(batch[i].method, batch[i].params);
                    this._resolvePromise(this._deferreds[requestId], data[i]);
                    delete this._deferreds[requestId];
                }
            }
1058524
function releaseTriggeredEvent(oHandler) {
		if (!oHandler) {
			Log.error("Release trigger events must not be called without passing a valid handler!");
			return;
		}

		var mEventInfo = mTriggerEventInfo[oHandler.type];

		if (!mEventInfo) {
			return;
		} else if (!mEventInfo.domRefs[oHandler.id] || !mEventInfo.domRefs[oHandler.id].domRef) {
			Log.warning("Release trigger event for event type " + oHandler.type + "on Control " + oHandler.id + ": DomRef does not exists");
			return;
		}

		delete mEventInfo.domRefs[oHandler.id];
	}
3522
function BatchCB (response) {
        console.log ("### Batch SMS CallBack --> Status=%j", response);

        if (response.status === 0 || response.status === -4) {
              console.log ("SMS Batch Test done");
              setTimeout (process.exit, 1000);
        }
    }
847544
public final void fireEvent(CalendarEvent evt) {
        if (fireEvents && !batchUpdates) {
            if (MODEL.isLoggable(FINER)) {
                MODEL.finer(getName() + ": fireing event: " + evt); //$NON-NLS-1$
            }

            requireNonNull(evt);
            Event.fireEvent(this, evt);
        }
    }
437140
function (batch, xhr) {
                for (var i = 0, requestId; i < batch.length; i++) {
                    requestId = this._getRequestId(batch[i].method, batch[i].params);
                    this._rejectPromise(this._deferreds[requestId], xhr);
                    delete this._deferreds[requestId];
                }
            }
327163
function chain_requests(ml, url) {
  return (batches) => {
    let promise = new Promise((resolve, reject) => resolve(new MonkeyLearnResponse()));

    // attach requests for all the batches sequentially to the original promise and return _that_
    return batches.reduce((promise, batch) =>
      promise.then((response) =>

        request(ml, {
          url: url,
          method: 'POST',
          body: batch,
          parse_response: false
        })

        .then(raw_response => {
          response._add_raw_response(raw_response);
          return response;
        })

        .catch(error => {
          if (error.hasOwnProperty('response')) {
            response._add_raw_response(error.response);
            error.response = response;
          } else {
            // if it's not a MonkeyLearn Error (so, some other js runtime error),
            // return as-is but add the response
            // not the cleanest solution but I don't want the error to lose the context
            error.response = response;
            error.error_code = '';
          }
          throw error;
        })
      )
    , promise)
  }
}
28804
@Override
    public void batchUpdate(HashMap invalidateIdEvents, HashMap invalidateTemplateEvents, ArrayList pushEntryEvents) {
        final String methodName = "batchUpdate()";
        if (tc.isDebugEnabled()) {
            Tr.debug(tc, methodName + " cacheName=" + cacheName + " ERROR because it should not be called");
        }
    }
542764
@Override
  public void processEvent(QueryBatch batch) {
    try ( DocumentPage docs = getDocs(batch) ) {
      while ( docs.hasNext() ) {
        for ( Consumer<DocumentRecord> listener : exportListeners ) {
          try {
            listener.accept(docs.next());
          } catch (Throwable t) {
            logger.error("Exception thrown by an onDocumentReady listener", t);
          }
        }
      }
    } catch (Throwable t) {
      for ( BatchFailureListener<Batch<String>> listener : failureListeners ) {
        try {
          listener.processFailure(batch, t);
        } catch (Throwable t2) {
          logger.error("Exception thrown by an onBatchFailure listener", t2);
        }
      }
      for ( BatchFailureListener<QueryBatch> queryBatchFailureListener : queryBatchFailureListeners ) {
        try {
          queryBatchFailureListener.processFailure(batch, t);
        } catch (Throwable t2) {
          logger.error("Exception thrown by an onFailure listener", t2);
        }
      }
    }
  }