Java 类io.vertx.core.spi.metrics.VertxMetrics 实例源码

项目:statful-client-vertx    文件:StatfulMetricsFactoryImpl.java   
@Override
public final VertxMetrics metrics(@Nonnull final Vertx vertx, @Nonnull final VertxOptions options) {
    final MetricsOptions metricsOptions = options.getMetricsOptions();

    final StatfulMetricsOptions statfulMetricsOptions;
    if (metricsOptions instanceof StatfulMetricsOptions) {
        statfulMetricsOptions = (StatfulMetricsOptions) metricsOptions;
    } else {
        statfulMetricsOptions = new StatfulMetricsOptions();
    }

    // check if there is a configuration path set, if so, load configuration from file
    final StatfulMetricsOptions effective;
    String configPath = statfulMetricsOptions.getConfigPath();
    if (Strings.isNullOrEmpty(configPath)) {
        effective = statfulMetricsOptions;
    } else {
        effective = buildFromFile(vertx, configPath);
    }

    return new VertxMetricsImpl(vertx, effective);
}
项目:vertx-warp10-metrics    文件:VertxMetricsFactoryImpl.java   
@Override
public VertxMetrics metrics(Vertx vertx, VertxOptions options) {
  MetricsOptions metricsOptions = options.getMetricsOptions();
  VertxWarp10Options vertxWarp10Options;
  if (metricsOptions instanceof VertxWarp10Options) {
    vertxWarp10Options = (VertxWarp10Options) metricsOptions;
  } else {
    vertxWarp10Options = new VertxWarp10Options(metricsOptions.toJson());
  }
  return new VertxMetricsImpl(vertx, vertxWarp10Options);
}
项目:vertx-hawkular-metrics    文件:VertxMetricsFactoryImpl.java   
@Override
public VertxMetrics metrics(Vertx vertx, VertxOptions vertxOptions) {
  MetricsOptions metricsOptions = vertxOptions.getMetricsOptions();
  VertxHawkularOptions vertxHawkularOptions;
  if (metricsOptions instanceof VertxHawkularOptions) {
    vertxHawkularOptions = (VertxHawkularOptions) metricsOptions;
  } else {
    vertxHawkularOptions = new VertxHawkularOptions(metricsOptions.toJson());
  }
  return new VertxMetricsImpl(vertx, vertxHawkularOptions);
}
项目:vertx-spring    文件:VertxListenerAwareMetricsFactory.java   
@Override
public VertxMetrics metrics(Vertx vertx, VertxOptions options) {
    dispatch("vertxStarted", listener -> listener.vertxStarted(vertx, options));
    return new ListenerAwareVertxMetrics(vertx);
}
项目:vertx-spring    文件:DispatchingVertxMetrics.java   
public DispatchingVertxMetrics(List<? extends VertxMetrics> delegates) {
    super(delegates);
}
项目:vertx-spring    文件:VertxActuatorMetrics.java   
@Override
public VertxMetrics metrics(Vertx vertx, VertxOptions options) {
    return new VertxMetricsImpl(counterService, gaugeService, properties);
}
项目:vertx-prometheus-metrics    文件:VertxPrometheusMetricsFactory.java   
@Override
public @NotNull VertxMetrics metrics(@NotNull Vertx vertx, @NotNull VertxOptions vertxOptions) {
  return new VertxPrometheusMetrics(vertx, asPrometheusOptions(vertxOptions));
}