Called when record is received in consumer
975867
static <K, V> void onResponse(ConsumerRecord<K, V> record, Span span) {
    setCommonTags(span);
    span.setTag("partition", record.partition());
    span.setTag("topic", record.topic());
    span.setTag("offset", record.offset());

  }
207514
private void processSingleRecord(Record record) {
        // TODO Add your own record processing logic here

        String data = null;
        try {
            // For this app, we interpret the payload as UTF-8 chars.
            data = decoder.decode(record.getData()).toString();
            // Assume this record came from AmazonKinesisSample and log its age.
            long recordCreateTime = new Long(data.substring("testData-".length()));
            long ageOfRecordInMillis = System.currentTimeMillis() - recordCreateTime;

            LOG.info(record.getSequenceNumber() + ", " + record.getPartitionKey() + ", " + data + ", Created "
                    + ageOfRecordInMillis + " milliseconds ago.");
        } catch (NumberFormatException e) {
            LOG.info("Record does not match sample record format. Ignoring record with data; " + data);
        } catch (CharacterCodingException e) {
            LOG.error("Malformed data: " + data, e);
        }
    }
1127859
def emitCurrentRecordEdited(self):
        
        if self._changedRecord == -1:
            return
        
        if self.signalsBlocked():
            return
        
        record = self._changedRecord
        self._changedRecord = -1
        self.currentRecordEdited.emit(record)
134421
@Override
    public IPromise<T> onResult(Consumer<T> resultHandler) {
        if (realCallback instanceof IPromise == false)
            throw new RuntimeException("this is an error.");
        else
            return ((IPromise)realCallback).onResult(resultHandler);
    }
1373458
public void publish(LogRecord record)
  {
    if (! isLoggable(record))
      return;
    
    int level = getLevel().intValue();

    for (int i = 0; i < _handlers.length; i++) {
      Handler handler = _handlers[i];

      if (level <= handler.getLevel().intValue())
        handler.publish(record);
    }
  }
474209
void process_record(InputRecord r, boolean expectingFinished)
            throws IOException {

        checkThrown();

        /*
         * Store the incoming handshake data, then see if we can
         * now process any completed handshake messages
         */
        input.incomingRecord(r);

        /*
         * We don't need to create a separate delegatable task
         * for finished messages.
         */
        if ((conn != null) || expectingFinished) {
            processLoop();
        } else {
            delegateTask(new PrivilegedExceptionAction<Void>() {
                public Void run() throws Exception {
                    processLoop();
                    return null;
                }
            });
        }
    }
762091
protected void gotoEOR(ArchiveRecord record) throws IOException {
        if (record.available() != 0) {
            throw new IOException("Record should be exhausted before coming " +
                "in here");
        }

        // Records end in 2*CRLF.  Suck it up.
        readExpectedChar(getIn(), CRLF.charAt(0));
        readExpectedChar(getIn(), CRLF.charAt(1));
        readExpectedChar(getIn(), CRLF.charAt(0));
        readExpectedChar(getIn(), CRLF.charAt(1));
    }
219541
public void doSet(Rec record) throws DBException
    {
        super.doSet(record);
        if (m_arrayCache != null)
            if (m_iLogicalIndex != NO_INDEX)
            {
                m_arrayCache.set(m_iLogicalIndex, this.getDataSource());    // Show the current record as deleted.
            }
    }
1105876
def emit(self, record):
        
        try:
            msg = self.format(record)
            if record.levelno < self.splitLevel:
                stream = self.outStream
            else:
                stream = self.errStream
            fs = "%s\n"

            try:
                if (isinstance(msg, unicode) and  # noqa: F405
                        getattr(stream, 'encoding', None)):
                    ufs = fs.decode(stream.encoding)
                    try:
                        stream.write(ufs % msg)
                    except UnicodeEncodeError:
                        stream.write((ufs % msg).encode(stream.encoding))
                else:
                    stream.write(fs % msg)
            except UnicodeError:
                stream.write(fs % msg.encode("UTF-8"))

            stream.flush()
        except (KeyboardInterrupt, SystemExit):
            raise
        except:
            self.handleError(record)
1053165
@SuppressWarnings("unchecked")
  private void processRecord(Object convertedRecord, ForkOperator forkOperator, RowLevelPolicyChecker rowChecker,
      RowLevelPolicyCheckResults rowResults, int branches, AcknowledgableWatermark watermark)
      throws Exception {
    // Skip the record if quality checking fails
    if (!rowChecker.executePolicies(convertedRecord, rowResults)) {
      if (watermark != null) {
        watermark.ack();
      }
      return;
    }

    List<Boolean> forkedRecords = forkOperator.forkDataRecord(this.taskState, convertedRecord);
    if (forkedRecords.size() != branches) {
      throw new ForkBranchMismatchException(String
          .format("Number of forked data records [%d] is not equal to number of branches [%d]", forkedRecords.size(),
              branches));
    }

    boolean needToCopy = inMultipleBranches(forkedRecords);
    // we only have to copy a record if it needs to go into multiple forks
    if (needToCopy && !(CopyHelper.isCopyable(convertedRecord))) {
      throw new CopyNotSupportedException(convertedRecord.getClass().getName() + " is not copyable");
    }

    int branch = 0;
    int copyInstance = 0;
    for (Optional<Fork> fork : this.forks.keySet()) {
      if (fork.isPresent() && forkedRecords.get(branch)) {
        Object recordForFork = needToCopy ? CopyHelper.copy(convertedRecord) : convertedRecord;
        copyInstance++;
        if (isStreamingTask()) {
          // Send the record, watermark pair down the fork
          ((RecordEnvelope) recordForFork).addCallBack(watermark.incrementAck());
        }
        // Put the record into the record queue of each fork. A put may timeout and return a false, in which
        // case the put is retried until it is successful.
        boolean succeeded = false;
        while (!succeeded) {
          succeeded = fork.get().putRecord(recordForFork);
        }
      }
      branch++;
    }
    if (watermark != null) {
      watermark.ack();
    }
  }
1029787
@Override
  public final void publish(LogRecord record)
  {
    if (! isLoggable(record)) {
      return;
    }

    Filter filter = getFilter();

    if (filter != null && ! filter.isLoggable(record))
      return;

    if (record == null) {
      System.out.println(this + ": no record");
      return;
    }

    //synchronized (this) {
      processPublish(record);
      //processFlush();
    //}

    /*
    _logQueue.offer(record);

    if (CurrentTime.isTest()) {
      waitForEmpty();
    }
    */
  }
1211907
function onCacheResponse (
  error, record, recordName, socketWrapper, onComplete, onError, options, context, metaData
) {
  if (error) {
    sendError(
      C.EVENT.RECORD_LOAD_ERROR,
      `error while loading ${recordName} from cache:${error.toString()}`,
      recordName,
      socketWrapper,
      onError,
      options,
      context,
      metaData
    )
  } else if (record) {
    onComplete.call(context, record, recordName, socketWrapper)
  } else if (
      !options.storageExclusion ||
      !options.storageExclusion.test(recordName)
    ) {

    let storageTimedOut = false
    const storageTimeout = setTimeout(() => {
      storageTimedOut = true
      sendError(
        C.EVENT.STORAGE_RETRIEVAL_TIMEOUT,
        recordName, recordName, socketWrapper,
        onError, options, context, metaData
      )
    }, options.storageRetrievalTimeout)

    options.storage.get(recordName, (storageError, recordData) => {
      if (!storageTimedOut) {
        clearTimeout(storageTimeout)
        onStorageResponse(
          storageError,
          recordData,
          recordName,
          socketWrapper,
          onComplete,
          onError,
          options,
          context,
          metaData
        )
      }
    }, metaData)
  } else {
    onComplete.call(context, null, recordName, socketWrapper)
  }
}
787871
public void publish(LogRecord record)
  {
    if (! isLoggable(record))
      return;

    if (_handler != null)
      _handler.publish(record);
  }
12265
private void notifyRecordingStop() {
        IStreamAwareScopeHandler handler = getStreamAwareHandler();
        if (handler != null) {
            try {
                handler.streamRecordStop(this);
            } catch (Throwable t) {
                log.error("Error in notifyRecordingStop", t);
            }
        }
    }
316132
def emit(self, record: logging.LogRecord):
        """"""
        created = datetime.datetime.fromtimestamp(record.created, timezone)
        obj = {
            "level": record.levelname.lower(),
            "msg": record.msg % record.args,
            "source": "%s:%d" % (record.filename, record.lineno),
            "time": format_datetime(created),
            "thread": reduce_thread_id(record.thread),
        }
        if record.exc_info is not None:
            obj["error"] = traceback.format_exception(*record.exc_info)[1:]
        try:
            obj["context"] = self.local.context
        except AttributeError:
            pass
        json.dump(obj, sys.stdout, sort_keys=True)
        sys.stdout.write("\n")
        sys.stdout.flush()
278564
public void replay() {

        int index = 0;
        for (MessageType type : typeBuffer) {
            switch (type) {
            case RECORD_START:
                getReceiver().startRecord(valueBuffer.get(index));
                ++index;
                break;
            case RECORD_END:
                getReceiver().endRecord();
                break;

            case ENTITY_START:
                getReceiver().startEntity(valueBuffer.get(index));
                ++index;
                break;
            case ENTITY_END:
                getReceiver().endEntity();
                break;
            default:
                getReceiver().literal(valueBuffer.get(index), valueBuffer.get(index+1));
                index +=2;
                break;
            }
        }
    }
633826
def emitRecordMiddleDoubleClicked(self, item):
        
        # emit that the record has been double clicked
        if isinstance(item, XOrbRecordItem) and not self.signalsBlocked():
            self.recordMiddleDoubleClicked.emit(item.record())