本文整理了Java中com.netflix.spectator.api.Registry.spliterator
方法的一些代码示例,展示了Registry.spliterator
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Registry.spliterator
方法的具体详情如下:
包路径:com.netflix.spectator.api.Registry
类名称:Registry
方法名:spliterator
暂无
代码示例来源:origin: com.netflix.spectator/spectator-api
/** Returns a stream of all registered meters. */
default Stream<Meter> stream() {
return StreamSupport.stream(spliterator(), false);
}
代码示例来源:origin: Netflix/spectator
/** Returns a stream of all registered meters. */
default Stream<Meter> stream() {
return StreamSupport.stream(spliterator(), false);
}
代码示例来源:origin: org.springframework.cloud/spring-cloud-netflix-spectator
@Override
public long count() {
return stream(registry.spliterator(), false).flatMap(
m -> stream(m.measure().spliterator(), false)).count();
}
}
代码示例来源:origin: org.springframework.cloud/spring-cloud-netflix-spectator
@Override
public Iterable<Metric<?>> findAll() {
return stream(registry.spliterator(), false)
.flatMap(
metric -> stream(metric.measure().spliterator(), false).map(
measure -> new Metric<>(asHierarchicalName(measure.id()),
measure.value())))
.sorted((m1, m2) -> m1.getName().compareTo(m2.getName()))
.collect(Collectors.toList());
}
内容来源于网络,如有侵权,请联系作者删除!