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

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

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

Event.setStreamId介绍

暂无

代码示例

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

for (int i = 0; i < eventObjects.length(); i++) {
  Event event = gson.fromJson(eventObjects.get(i).toString(), Event.class);
  event.setStreamId(streamId);
  eventList.add(event);

代码示例来源:origin: org.wso2.das/org.wso2.das.integration.common.clients

public void publish(String streamName, String version, List<Event> events) throws DataEndpointException {
  String streamId = DataBridgeCommonsUtils.generateStreamId(streamName, version);
  for (Event event : events) {
    event.setStreamId(streamId);
    dataPublisher.publish(event);
  }
}

代码示例来源:origin: org.wso2.analytics.apim/org.wso2.analytics.apim.integration.common.clients

public void publish(String streamName, String version, Event event) throws DataEndpointException {
    String streamId = DataBridgeCommonsUtils.generateStreamId(streamName, version);
    event.setStreamId(streamId);
    dataPublisher.publish(event);
  }
}

代码示例来源:origin: org.wso2.analytics.apim/org.wso2.analytics.apim.integration.common.clients

public void publish(String streamName, String version, List<Event> events) throws DataEndpointException {
  String streamId = DataBridgeCommonsUtils.generateStreamId(streamName, version);
  for (Event event : events) {
    event.setStreamId(streamId);
    dataPublisher.publish(event);
  }
}

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

for (int i = 0; i < eventObjects.length(); i++) {
  Event event = gson.fromJson(eventObjects.get(i).toString(), Event.class);
  event.setStreamId(streamId);
  eventList.add(event);

代码示例来源:origin: org.wso2.das/org.wso2.das.integration.common.clients

public void publish(String streamName, String version, Event event) throws DataEndpointException {
    String streamId = DataBridgeCommonsUtils.generateStreamId(streamName, version);
    event.setStreamId(streamId);
    dataPublisher.publish(event);
  }
}

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

event.setStreamId(streamId);
eventList.add(event);

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

event.setStreamId(streamId);
eventList.add(event);

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

String streamId = streamIdCache.get(streamKey);
if (null != streamId) {
  event.setStreamId(streamId);
  boolean publishSuccessful = dataPublisher.tryPublish(event);
  if (!publishSuccessful) {

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

data.getEvent().setStreamId(streamId);
    dataPublisher.publish(data.getEvent());
  } else {
data.getEvent().setStreamId(streamId);
try {
  dataPublisher.publish(data.getEvent());

代码示例来源: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

org.wso2.carbon.databridge.commons.Event wso2event = new org.wso2.carbon.databridge.commons.Event();
wso2event.setTimeStamp(event.getTimestamp());
wso2event.setStreamId(this.outputStreamId);
Object[] eventData = event.getData();
if (eventData.length > 0) {

代码示例来源: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

streamId = thriftEventBundle.getStringAttributeList().get(indexCounter.getStringCount());
indexCounter.incrementStringCount();
event.setStreamId(streamId);
long timeStamp = thriftEventBundle.getLongAttributeList().get(indexCounter.getLongCount());
indexCounter.incrementLongCount();

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

streamId = thriftEventBundle.getStringAttributeList().get(indexCounter.getStringCount());
indexCounter.incrementStringCount();
event.setStreamId(streamId);
long timeStamp = thriftEventBundle.getLongAttributeList().get(indexCounter.getLongCount());
indexCounter.incrementLongCount();

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

streamId = thriftEventBundle.getStringAttributeList().get(indexCounter.getStringCount());
indexCounter.incrementStringCount();
event.setStreamId(streamId);
long timeStamp = thriftEventBundle.getLongAttributeList().get(indexCounter.getLongCount());
indexCounter.incrementLongCount();

相关文章