本文整理了Java中zipkin.internal.Util.sortedList()
方法的一些代码示例,展示了Util.sortedList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.sortedList()
方法的具体详情如下:
包路径:zipkin.internal.Util
类名称: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());
}
内容来源于网络,如有侵权,请联系作者删除!