org.wso2.carbon.databridge.commons.Event.setMetaData()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中org.wso2.carbon.databridge.commons.Event.setMetaData()方法的一些代码示例,展示了Event.setMetaData()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.setMetaData()方法的具体详情如下:
包路径:org.wso2.carbon.databridge.commons.Event
类名称:Event
方法名:setMetaData

Event.setMetaData介绍

暂无

代码示例

代码示例来源:origin: org.apache.stratos/org.apache.stratos.cartridge.agent

public void publish(DataContext dataContext) {
  Event event = new Event();
  event.setTimeStamp(new Date().getTime());
  event.setMetaData(dataContext.getMetaData());
  event.setPayloadData(dataContext.getPayloadData());
  try {
    dataPublisher.publish(streamDefinition.getName(), streamDefinition.getVersion(), event);
  } catch (AgentException e) {
    String errorMsg = "Error in publishing event";
    log.error(errorMsg, e);
    // no need to throw here
  }
}

代码示例来源:origin: org.wso2.carbon.business-process/org.wso2.carbon.bpel.bam.publisher

private Event createEvent(String streamId, BAMStreamConfiguration stream,
             ExtensionContext context, Element element)
    throws FaultException {
  Event e = new Event();
  e.setStreamId(streamId);
  e.setTimeStamp(System.currentTimeMillis());
  e.setCorrelationData(createCorrelationData(stream, context, element));
  e.setMetaData(createMetadata(stream, context, element));
  e.setPayloadData(createPayloadData(stream, context, element));
  return e;
}

代码示例来源:origin: org.wso2.extension.siddhi.map.wso2event/siddhi-map-wso2event

metaArray[i] = eventData[this.metaDataPositions[i]];
wso2event.setMetaData(metaArray);

代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.analytics.datasink

private void updateEvent(Event oldEvent, Event newEvent) {
    oldEvent.setArbitraryDataMap(newEvent.getArbitraryDataMap());
    oldEvent.setCorrelationData(newEvent.getCorrelationData());
    oldEvent.setMetaData(newEvent.getMetaData());
    oldEvent.setPayloadData(newEvent.getPayloadData());
    oldEvent.setStreamId(newEvent.getStreamId());
    oldEvent.setTimeStamp(newEvent.getTimeStamp());
  }
}

代码示例来源:origin: org.wso2.carbon.analytics-common/org.wso2.carbon.databridge.receiver.binary

public Event getEvent(ByteBuffer byteBuffer, StreamTypeHolder streamTypeHolder) throws MalformedEventException {
  long timeStamp = byteBuffer.getLong();
  int streamIdSize = byteBuffer.getInt();
  String streamId = BinaryMessageConverterUtil.getString(byteBuffer, streamIdSize);
  Event event = new Event();
  event.setStreamId(streamId);
  event.setTimeStamp(timeStamp);
  AttributeType[][] attributeTypeOrder = streamTypeHolder.getDataType(event.getStreamId());
  if (attributeTypeOrder == null) {
    streamTypeHolder.reloadStreamTypeHolder();
    attributeTypeOrder = streamTypeHolder.getDataType(event.getStreamId());
    if (attributeTypeOrder == null) {
      throw new EventConversionException("No StreamDefinition for streamId " + event.getStreamId()
          + " present in cache ");
    }
  }
  event.setMetaData(this.toObjectArray(byteBuffer, attributeTypeOrder[0],
      BinaryDataReceiverConstants.META_DATA_FIELD));
  event.setCorrelationData(this.toObjectArray(byteBuffer, attributeTypeOrder[1],
      BinaryDataReceiverConstants.CORRELATION_DATA_FIELD));
  event.setPayloadData(this.toObjectArray(byteBuffer, attributeTypeOrder[2],
      BinaryDataReceiverConstants.PAYLOAD_DATA_FIELD));
  event.setArbitraryDataMap(this.toStringMap(byteBuffer));
  return event;
}

代码示例来源:origin: org.wso2.carbon.analytics-common/org.wso2.carbon.databridge.receiver.thrift

event.setMetaData(this.toObjectArray(thriftEventBundle, attributeTypeOrder[0], indexCounter));
event.setCorrelationData(this.toObjectArray(thriftEventBundle, attributeTypeOrder[1], indexCounter));
event.setPayloadData(this.toObjectArray(thriftEventBundle, attributeTypeOrder[2], indexCounter));

代码示例来源:origin: org.wso2.carbon.analytics/org.wso2.carbon.databridge.receiver.thrift

event.setMetaData(this.toObjectArray(thriftEventBundle, attributeTypeOrder[0], indexCounter));
event.setCorrelationData(this.toObjectArray(thriftEventBundle, attributeTypeOrder[1], indexCounter));
event.setPayloadData(this.toObjectArray(thriftEventBundle, attributeTypeOrder[2], indexCounter));

代码示例来源:origin: org.wso2.carbon.commons/org.wso2.carbon.databridge.receiver.thrift

event.setMetaData(this.toObjectArray(thriftEventBundle, attributeTypeOrder[0], indexCounter));
event.setCorrelationData(this.toObjectArray(thriftEventBundle, attributeTypeOrder[1], indexCounter));
event.setPayloadData(this.toObjectArray(thriftEventBundle, attributeTypeOrder[2], indexCounter));

相关文章