Marshall ``flavor`` and ``data`` into a standard event.
421550
def make_event_data(self, flavor, data):
        
        if not flavor.startswith('_'):
            raise ValueError('Event flavor must start with _underscore')

        d = {'source': {'space': self._event_space, 'id': self._source_id}}
        d.update(data)
        return {flavor: d}
1099793
public void repeat(CmmnActivityExecution execution, String standardEvent) {
    CmmnActivity activity = execution.getActivity();
    boolean repeat = false;

    if (activity.getEntryCriteria().isEmpty()) {
      List<String> events = activity.getProperties().get(CmmnProperties.REPEAT_ON_STANDARD_EVENTS);
      if (events != null && events.contains(standardEvent)) {
        repeat = evaluateRepetitionRule(execution);
      }
    }
    else {

      if (ENABLE.equals(standardEvent) || START.equals(standardEvent) || OCCUR.equals(standardEvent)) {
        repeat = evaluateRepetitionRule(execution);
      }
    }

    if (repeat) {

      CmmnActivityExecution parent = execution.getParent();

      // instantiate a new instance of given activity
      List<CmmnExecution> children = parent.createChildExecutions(Arrays.asList(activity));
      // start the lifecycle of the new instance
      parent.triggerChildExecutionsLifecycle(children);
    }

  }
23243
public void marshalHandle(ActivityHandle arg0, DataOutput arg1)
			throws IOException {

		final Class<?> handleType = arg0.getClass();

		if (handleType == DialogWithIdActivityHandle_TYPE) {
			arg1.writeByte(dialogWithIdActivityHandle);
			final DialogWithIdActivityHandle handle = (DialogWithIdActivityHandle) arg0;
			arg1.writeUTF(handle.getDialogId());
		} else if (handleType == DialogWithoutIdActivityHandle_TYPE) {
			arg1.writeByte(dialogWithoutIdActivityHandle);
			final DialogWithoutIdActivityHandle handle = (DialogWithoutIdActivityHandle) arg0;
			arg1.writeUTF(handle.getCallId());
			arg1.writeUTF(handle.getLocalTag());
		} else {
			throw new IOException("unknown activity handle type");
		}
	}
393431
public static ServerSentEvent withEventId(ByteBuf eventId, ByteBuf data) {
        return new ServerSentEvent(eventId, null, data);
    }
886242
def dataReceived(self, data):
        
        self.bytes_in += (len(data))
        self.buffer_in = self.buffer_in + data

        while self.CheckDataReceived():
            pass
1006902
def marshal_load(data)
      values, opts = data
      initialize(values[:id])
      initialize_from(values, opts)
    end
269854
private void processQueue() {
        CachedEvent cachedEvent;
        try {
            IRTMPEvent event = null;
            RTMPMessage message = null;
            // get first event in the queue
            cachedEvent = queue.poll();
            if (cachedEvent != null) {
                // get the data type
                final byte dataType = cachedEvent.getDataType();
                // get the data
                IoBuffer buffer = cachedEvent.getData();
                // get the current size of the buffer / data
                int bufferLimit = buffer.limit();
                if (bufferLimit > 0) {
                    // create new RTMP message and push to the consumer
                    switch (dataType) {
                        case Constants.TYPE_AGGREGATE:
                            event = new Aggregate(buffer);
                            event.setTimestamp(cachedEvent.getTimestamp());
                            message = RTMPMessage.build(event);
                            break;
                        case Constants.TYPE_AUDIO_DATA:
                            event = new AudioData(buffer);
                            event.setTimestamp(cachedEvent.getTimestamp());
                            message = RTMPMessage.build(event);
                            break;
                        case Constants.TYPE_VIDEO_DATA:
                            event = new VideoData(buffer);
                            event.setTimestamp(cachedEvent.getTimestamp());
                            message = RTMPMessage.build(event);
                            break;
                        default:
                            event = new Notify(buffer);
                            event.setTimestamp(cachedEvent.getTimestamp());
                            message = RTMPMessage.build(event);
                            break;
                    }
                    // push it down to the recorder
                    recordingConsumer.pushMessage(null, message);
                } else if (bufferLimit == 0 && dataType == Constants.TYPE_AUDIO_DATA) {
                    log.debug("Stream data size was 0, sending empty audio message");
                    // allow for 0 byte audio packets
                    event = new AudioData(IoBuffer.allocate(0));
                    event.setTimestamp(cachedEvent.getTimestamp());
                    message = RTMPMessage.build(event);
                    // push it down to the recorder
                    recordingConsumer.pushMessage(null, message);
                } else {
                    log.debug("Stream data size was 0, recording pipe will not be notified");
                }
            }
        } catch (Exception e) {
            log.warn("Exception while pushing to consumer", e);
        }
    }
449782
public void processingInstruction(String target, String data) throws SAXException {
		emitWhitespace();
		super.processingInstruction(target, data);
	}
18384
def ProduceEventWithEventData(self, event, event_data):
    
    if event.timestamp is None:
      raise errors.InvalidEvent('Event timestamp value not set.')

    if event.timestamp < self._INT64_MIN or event.timestamp > self._INT64_MAX:
      raise errors.InvalidEvent('Event timestamp value out of bounds.')

    event_data_hash = event_data.GetAttributeValuesHash()
    if event_data_hash != self._last_event_data_hash:
      # Make a copy of the event data before adding additional values.
      event_data = copy.deepcopy(event_data)

      # TODO: refactor to ProcessEventData.
      self.ProcessEvent(
          event_data, parser_chain=self.GetParserChain(),
          file_entry=self._file_entry)

      self._storage_writer.AddEventData(event_data)

      self._last_event_data_hash = event_data_hash
      self._last_event_data_identifier = event_data.GetIdentifier()

    if self._last_event_data_identifier:
      event.SetEventDataIdentifier(self._last_event_data_identifier)

    # TODO: remove this after structural fix is in place
    # https://github.com/log2timeline/plaso/issues/1691
    event.parser = self.GetParserChain()

    self._storage_writer.AddEvent(event)
    self._number_of_events += 1

    self.last_activity_timestamp = time.time()
1217881
def marshall(self, registry):
        """"""

        blocks = []
        for i in registry.get_all():
            blocks.append(self.marshall_collector(i))

        # Sort? used in tests
        blocks = sorted(blocks)

        # Needs EOF
        blocks.append("")

        return self.__class__.LINE_SEPARATOR_FMT.join(blocks)
389452
private <T extends AmazonWebServiceRequest> Request<T> marshall(
            T awsRequest,
            Marshaller<Request<T>, T> marshaller,
            AWSRequestMetrics awsRequestMetrics) {
        awsRequestMetrics.startEvent(Field.RequestMarshallTime);
        try {
            return marshaller.marshall(awsRequest);
        } catch (AmazonClientException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new AmazonClientException(ex.getMessage(), ex);
        } finally {
            awsRequestMetrics.endEvent(Field.RequestMarshallTime);
        }
    }
761503
def validate_flavor_data(self, expected, actual):
        
        self.log.debug('Validating flavor data...')
        self.log.debug('actual: {}'.format(repr(actual)))
        act = [a.name for a in actual]
        return self._validate_list_data(expected, act)
1266556
public void marshall(MarshallLocation marshallLocation, Object val) {
        marshallerRegistry().getMarshaller(marshallLocation, val).marshall(val, this, null);
    }
896117
public void single(MainStemEventData data) {
        MainstemMonitor mainstemMonitor = ArbitrateFactory.getInstance(data.getPipelineId(), MainstemMonitor.class);
        mainstemMonitor.single(data);
    }
1007311
protected int marshalMessagesToSameDestination(Address dest, Message[] buf, final int start_index, final int end_index,
                                                   int max_bundle_size) throws Exception {
        int num_msgs=0, bytes=0;
        for(int i=start_index; i != end_index; i=increment(i)) {
            Message msg=buf[i];
            if(msg != null && msg != NULL_MSG && Objects.equals(dest, msg.dest())) {
                long msg_size=msg.size();
                if(bytes + msg_size > max_bundle_size)
                    break;
                bytes+=msg_size;
                num_msgs++;
                buf[i]=NULL_MSG;
                msg.writeToNoAddrs(msg.src(), output, transport.getId());
            }
        }
        return num_msgs;
    }
1267520
private static ChannelBuffer createDataTerminatingChannelBuffer(byte[] data) {
        int length = data.length;
        if (length < 1) {
            return ChannelBuffers.wrappedBuffer(CRLF_DOT_CRLF);
        } else {
            byte[] terminating;

            byte last = data[length -1];

            if (length == 1) {
                if (last == CR) {
                    terminating = LF_DOT_CRLF;
                } else {
                    terminating = CRLF_DOT_CRLF;
                }
            } else {
                byte prevLast = data[length - 2];
                
                if (last == LF) {
                    if (prevLast == CR) {
                        terminating = DOT_CRLF;
                    } else {
                        terminating = CRLF_DOT_CRLF;
                    }
                } else if (last == CR) {
                    terminating = LF_DOT_CRLF;
                } else {
                    terminating = CRLF_DOT_CRLF;

                }
            }
            return ChannelBuffers.wrappedBuffer(data, terminating);
        }
        
      
    }
664466
def process(data)
      message = MultiJson.load(data, symbolize_keys: true)
      event   = message[:event]

      PusherFake.log("RECV #{id}: #{message}")

      if event.start_with?(CLIENT_EVENT_PREFIX)
        process_trigger(event, message)
      else
        process_event(event, message)
      end
    end