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

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

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

Event.getCorrelationData介绍

暂无

代码示例

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

if (event.getCorrelationData() != null && event.getCorrelationData().length != 0) {
  for (Object aCorrelationData : event.getCorrelationData()) {
    assignData(aCorrelationData, eventDataBuffer);

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

if (event.getCorrelationData() != null && event.getCorrelationData().length != 0) {
  for (Object aCorrelationData : event.getCorrelationData()) {
    assignData(aCorrelationData, eventDataBuffer);

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

private static int getEventSize(Event event) {
  int eventSize = 4 + event.getStreamId().length() + 8;
  Object[] data = event.getMetaData();
  if (data != null) {
    for (Object aData : data) {
      eventSize += getSize(aData);
    }
  }
  data = event.getCorrelationData();
  if (data != null) {
    for (Object aData : data) {
      eventSize += getSize(aData);
    }
  }
  data = event.getPayloadData();
  if (data != null) {
    for (Object aData : data) {
      eventSize += getSize(aData);
    }
  }
  if (event.getArbitraryDataMap() != null && event.getArbitraryDataMap().size() != 0) {
    for (Map.Entry<String, String> aArbitraryData : event.getArbitraryDataMap().entrySet()) {
      eventSize += 8 + aArbitraryData.getKey().length() + aArbitraryData.getValue().length();
    }
  }
  return eventSize;
}

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

private static int getEventSize(Event event) {
  int eventSize = 4 + event.getStreamId().length() + 8;
  Object[] data = event.getMetaData();
  if (data != null) {
    for (Object aData : data) {
      eventSize += getSize(aData);
    }
  }
  data = event.getCorrelationData();
  if (data != null) {
    for (Object aData : data) {
      eventSize += getSize(aData);
    }
  }
  data = event.getPayloadData();
  if (data != null) {
    for (Object aData : data) {
      eventSize += getSize(aData);
    }
  }
  if (event.getArbitraryDataMap() != null && event.getArbitraryDataMap().size() != 0) {
    for (Map.Entry<String, String> aArbitraryData : event.getArbitraryDataMap().entrySet()) {
      eventSize += 8 + aArbitraryData.getKey().length() + aArbitraryData.getValue().length();
    }
  }
  return eventSize;
}

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

public static int getSize(Event event) {
  int size = event.getStreamId().getBytes().length;
  size += 8; // for timestamp.
  if (event.getPayloadData() != null) {
    size += getSize(event.getPayloadData());
  }
  if (event.getMetaData() != null) {
    size += getSize(event.getMetaData());
  }
  if (event.getCorrelationData() != null) {
    size += getSize(event.getCorrelationData());
  }
  if (event.getArbitraryDataMap() != null) {
    size += getSize(event.getArbitraryDataMap());
  }
  return size;
}

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

for (int i = 0; i < correlationDefinitions.size(); i++) {
  Attribute attribute = correlationDefinitions.get(i);
  if (!compare(event1.getCorrelationData()[i], event2.getCorrelationData()[i], attribute.getType())) {
    return false;
if (!(event1.getCorrelationData() == event2.getCorrelationData())) {
  return false;

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

for (int i = 0; i < correlationDefinitions.size(); i++) {
  Attribute attribute = correlationDefinitions.get(i);
  if (!compare(event1.getCorrelationData()[i], event2.getCorrelationData()[i], attribute.getType())) {
    return false;
if (!(event1.getCorrelationData() == event2.getCorrelationData())) {
  return false;

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

wso2event.getCorrelationData()[i];

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

populateTypedAttributes(analyticsSchema, AnalyticsEventSinkConstants.EVENT_CORRELATION_DATA_TYPE,
            streamDefinition.getCorrelationData(),
            event.getCorrelationData(), eventAttributes);
Long payloadTimestamp = populateTypedPayloadAttributes(analyticsSchema, null,
                            streamDefinition.getPayloadData(),

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

populateTypedAttributes(AnalyticsDatasinkConstants.EVENT_CORRELATION_DATA_TYPE,
    streamDefinition.getCorrelationData(),
    event.getCorrelationData(), eventAttributes);
populateTypedAttributes(AnalyticsDatasinkConstants.EVENT_PAYLOAD_DATA_TYPE,
    streamDefinition.getPayloadData(),

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

public static ThriftEventBundle toThriftEventBundle(Event event,
                          ThriftEventBundle eventBundle,
                          String sessionId) {
  ThriftEventBundle thriftEventBundle = eventBundle;
  if (thriftEventBundle == null) {
    thriftEventBundle = new ThriftEventBundle();
    thriftEventBundle.setStringAttributeList(new LinkedList<String>()); //adding string list
    thriftEventBundle.setLongAttributeList(new LinkedList<Long>()); //adding long list
    thriftEventBundle.setSessionId(sessionId);
    thriftEventBundle.setEventNum(0);
  }
  thriftEventBundle.addToStringAttributeList(event.getStreamId());
  thriftEventBundle.addToLongAttributeList(event.getTimeStamp());
  thriftEventBundle = assignAttributes(thriftEventBundle, event.getMetaData());
  thriftEventBundle = assignAttributes(thriftEventBundle, event.getCorrelationData());
  thriftEventBundle = assignAttributes(thriftEventBundle, event.getPayloadData());
  thriftEventBundle = assignMap(thriftEventBundle, event.getArbitraryDataMap());
  thriftEventBundle.setEventNum(thriftEventBundle.getEventNum() + 1);
  return thriftEventBundle;
}

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

public static ThriftEventBundle toThriftEventBundle(Event event,
                          ThriftEventBundle eventBundle,
                          String sessionId) {
  ThriftEventBundle thriftEventBundle = eventBundle;
  if (thriftEventBundle == null) {
    thriftEventBundle = new ThriftEventBundle();
    thriftEventBundle.setStringAttributeList(new LinkedList<String>());//adding string list
    thriftEventBundle.setLongAttributeList(new LinkedList<Long>());//adding long list
    thriftEventBundle.setSessionId(sessionId);
    thriftEventBundle.setEventNum(0);
  }
  thriftEventBundle.addToStringAttributeList(event.getStreamId());
  thriftEventBundle.addToLongAttributeList(event.getTimeStamp());
  thriftEventBundle = assignAttributes(thriftEventBundle, event.getMetaData());
  thriftEventBundle = assignAttributes(thriftEventBundle, event.getCorrelationData());
  thriftEventBundle = assignAttributes(thriftEventBundle, event.getPayloadData());
  thriftEventBundle = assignMap(thriftEventBundle, event.getArbitraryDataMap());
  thriftEventBundle.setEventNum(thriftEventBundle.getEventNum() + 1);
  return thriftEventBundle;
}

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

public static ThriftEventBundle toThriftEventBundle(Event event,
                          ThriftEventBundle eventBundle,
                          String sessionId) {
  ThriftEventBundle thriftEventBundle = eventBundle;
  if (thriftEventBundle == null) {
    thriftEventBundle = new ThriftEventBundle();
    thriftEventBundle.setStringAttributeList(new LinkedList<String>());//adding string list
    thriftEventBundle.setLongAttributeList(new LinkedList<Long>());//adding long list
    thriftEventBundle.setSessionId(sessionId);
    thriftEventBundle.setEventNum(0);
  }
  thriftEventBundle.addToStringAttributeList(event.getStreamId());
  thriftEventBundle.addToLongAttributeList(event.getTimeStamp());
  thriftEventBundle = assignAttributes(thriftEventBundle, event.getMetaData());
  thriftEventBundle = assignAttributes(thriftEventBundle, event.getCorrelationData());
  thriftEventBundle = assignAttributes(thriftEventBundle, event.getPayloadData());
  thriftEventBundle = assignMap(thriftEventBundle, event.getArbitraryDataMap());
  thriftEventBundle.setEventNum(thriftEventBundle.getEventNum() + 1);
  return thriftEventBundle;
}

相关文章