zipkin.internal.Util.sortedList()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(147)

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

Util.sortedList介绍

暂无

代码示例

代码示例来源:origin: io.zipkin.java/zipkin-storage-cassandra

static List<String> annotationKeys(QueryRequest request) {
 if (request.annotations.isEmpty() && request.binaryAnnotations.isEmpty()) {
  return Collections.emptyList();
 }
 checkArgument(request.serviceName != null, "serviceName needed with annotation query");
 Set<String> annotationKeys = new LinkedHashSet<>();
 for (String a : request.annotations) { // doesn't include CORE_ANNOTATIONS
  annotationKeys.add(request.serviceName + ":" + a);
 }
 for (Map.Entry<String, String> b : request.binaryAnnotations.entrySet()) {
  annotationKeys.add(request.serviceName + ":" + b.getKey() + ":" + b.getValue());
 }
 return sortedList(annotationKeys);
}

代码示例来源:origin: io.zipkin.java/zipkin-storage-elasticsearch

@Override public List<String> apply(SearchResponse input) {
 Iterator<Aggregation> aggregations = input.getAggregations() != null
   ? input.getAggregations().iterator()
   : null;
 if (aggregations == null) {
  return ImmutableList.of();
 }
 ImmutableSet.Builder<String> result = ImmutableSet.builder();
 while (aggregations.hasNext()) {
  addBucketKeys(aggregations.next(), result);
 }
 return Util.sortedList(result.build());
}

相关文章