mirror of
https://github.com/jlengrand/vert.x.git
synced 2026-03-10 08:51:19 +00:00
Revert "Rename MetricsProvider -> MetricsObject"
This reverts commit 61001582d6.
This commit is contained in:
@@ -46,7 +46,7 @@ import java.util.Objects;
|
||||
/**
|
||||
* @author <a href="mailto:nmaurer@redhat.com">Norman Maurer</a>
|
||||
*/
|
||||
public class DatagramSocketImpl implements DatagramSocket, MetricsObject {
|
||||
public class DatagramSocketImpl implements DatagramSocket, MetricsProvider {
|
||||
|
||||
public static DatagramSocketImpl create(VertxInternal vertx, DatagramSocketOptions options) {
|
||||
DatagramSocketImpl socket = new DatagramSocketImpl(vertx, options);
|
||||
|
||||
@@ -24,7 +24,7 @@ import io.vertx.core.impl.utils.ConcurrentCyclicSequence;
|
||||
import io.vertx.core.logging.Logger;
|
||||
import io.vertx.core.logging.LoggerFactory;
|
||||
import io.vertx.core.spi.metrics.EventBusMetrics;
|
||||
import io.vertx.core.spi.metrics.MetricsObject;
|
||||
import io.vertx.core.spi.metrics.MetricsProvider;
|
||||
import io.vertx.core.spi.metrics.VertxMetrics;
|
||||
|
||||
import java.util.Iterator;
|
||||
@@ -40,7 +40,7 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
*
|
||||
* @author <a href="http://tfox.org">Tim Fox</a> T
|
||||
*/
|
||||
public class EventBusImpl implements EventBus, MetricsObject {
|
||||
public class EventBusImpl implements EventBus, MetricsProvider {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(EventBusImpl.class);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import io.vertx.core.net.ProxyType;
|
||||
import io.vertx.core.net.impl.SSLHelper;
|
||||
import io.vertx.core.spi.metrics.HttpClientMetrics;
|
||||
import io.vertx.core.spi.metrics.Metrics;
|
||||
import io.vertx.core.spi.metrics.MetricsObject;
|
||||
import io.vertx.core.spi.metrics.MetricsProvider;
|
||||
import io.vertx.core.streams.ReadStream;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
@@ -48,7 +48,7 @@ import java.util.function.Function;
|
||||
*
|
||||
* @author <a href="http://tfox.org">Tim Fox</a>
|
||||
*/
|
||||
public class HttpClientImpl implements HttpClient, MetricsObject {
|
||||
public class HttpClientImpl implements HttpClient, MetricsProvider {
|
||||
|
||||
private final Function<HttpClientResponse, Future<HttpClientRequest>> DEFAULT_HANDLER = resp -> {
|
||||
try {
|
||||
|
||||
@@ -44,7 +44,7 @@ import io.vertx.core.net.SocketAddress;
|
||||
import io.vertx.core.net.impl.*;
|
||||
import io.vertx.core.spi.metrics.HttpServerMetrics;
|
||||
import io.vertx.core.spi.metrics.Metrics;
|
||||
import io.vertx.core.spi.metrics.MetricsObject;
|
||||
import io.vertx.core.spi.metrics.MetricsProvider;
|
||||
import io.vertx.core.spi.metrics.VertxMetrics;
|
||||
import io.vertx.core.streams.ReadStream;
|
||||
|
||||
@@ -61,7 +61,7 @@ import java.util.stream.Collectors;
|
||||
*
|
||||
* @author <a href="http://tfox.org">Tim Fox</a>
|
||||
*/
|
||||
public class HttpServerImpl implements HttpServer, Closeable, MetricsObject {
|
||||
public class HttpServerImpl implements HttpServer, Closeable, MetricsProvider {
|
||||
|
||||
static final Logger log = LoggerFactory.getLogger(HttpServerImpl.class);
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ import io.vertx.core.spi.VerticleFactory;
|
||||
import io.vertx.core.spi.VertxMetricsFactory;
|
||||
import io.vertx.core.spi.cluster.ClusterManager;
|
||||
import io.vertx.core.spi.metrics.Metrics;
|
||||
import io.vertx.core.spi.metrics.MetricsObject;
|
||||
import io.vertx.core.spi.metrics.MetricsProvider;
|
||||
import io.vertx.core.spi.metrics.PoolMetrics;
|
||||
import io.vertx.core.spi.metrics.VertxMetrics;
|
||||
|
||||
@@ -74,7 +74,7 @@ import java.util.function.Supplier;
|
||||
/**
|
||||
* @author <a href="http://tfox.org">Tim Fox</a>
|
||||
*/
|
||||
public class VertxImpl implements VertxInternal, MetricsObject {
|
||||
public class VertxImpl implements VertxInternal, MetricsProvider {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(VertxImpl.class);
|
||||
|
||||
|
||||
@@ -13,13 +13,13 @@ package io.vertx.core.impl;
|
||||
|
||||
import io.vertx.core.*;
|
||||
import io.vertx.core.spi.metrics.Metrics;
|
||||
import io.vertx.core.spi.metrics.MetricsObject;
|
||||
import io.vertx.core.spi.metrics.MetricsProvider;
|
||||
import io.vertx.core.spi.metrics.PoolMetrics;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:julien@julienviet.com">Julien Viet</a>
|
||||
*/
|
||||
class WorkerExecutorImpl implements MetricsObject, WorkerExecutorInternal {
|
||||
class WorkerExecutorImpl implements MetricsProvider, WorkerExecutorInternal {
|
||||
|
||||
private final Context ctx;
|
||||
private final VertxImpl.SharedWorkerPool pool;
|
||||
|
||||
@@ -30,7 +30,7 @@ import io.vertx.core.net.NetClientOptions;
|
||||
import io.vertx.core.net.NetSocket;
|
||||
import io.vertx.core.net.SocketAddress;
|
||||
import io.vertx.core.spi.metrics.Metrics;
|
||||
import io.vertx.core.spi.metrics.MetricsObject;
|
||||
import io.vertx.core.spi.metrics.MetricsProvider;
|
||||
import io.vertx.core.spi.metrics.TCPMetrics;
|
||||
import io.vertx.core.spi.metrics.VertxMetrics;
|
||||
|
||||
@@ -47,7 +47,7 @@ import java.util.concurrent.TimeUnit;
|
||||
*
|
||||
* @author <a href="http://tfox.org">Tim Fox</a>
|
||||
*/
|
||||
public class NetClientImpl implements MetricsObject, NetClient {
|
||||
public class NetClientImpl implements MetricsProvider, NetClient {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(NetClientImpl.class);
|
||||
protected final int idleTimeout;
|
||||
|
||||
@@ -32,7 +32,7 @@ import io.vertx.core.net.NetServerOptions;
|
||||
import io.vertx.core.net.NetSocket;
|
||||
import io.vertx.core.net.SocketAddress;
|
||||
import io.vertx.core.spi.metrics.Metrics;
|
||||
import io.vertx.core.spi.metrics.MetricsObject;
|
||||
import io.vertx.core.spi.metrics.MetricsProvider;
|
||||
import io.vertx.core.spi.metrics.TCPMetrics;
|
||||
import io.vertx.core.spi.metrics.VertxMetrics;
|
||||
import io.vertx.core.streams.ReadStream;
|
||||
@@ -42,6 +42,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -50,7 +51,7 @@ import java.util.stream.Collectors;
|
||||
*
|
||||
* @author <a href="http://tfox.org">Tim Fox</a>
|
||||
*/
|
||||
public class NetServerImpl implements Closeable, MetricsObject, NetServer {
|
||||
public class NetServerImpl implements Closeable, MetricsProvider, NetServer {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(NetServerImpl.class);
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@ package io.vertx.core.spi.metrics;
|
||||
import io.vertx.core.metrics.Measured;
|
||||
|
||||
/**
|
||||
* Metrics object is the base SPI used by metrics implementations to retrieve a {@link io.vertx.core.spi.metrics.Metrics}
|
||||
* Metrics provider is the base SPI used by metrics implementations to retrieve a {@link io.vertx.core.spi.metrics.Metrics}
|
||||
* object.<p/>
|
||||
*
|
||||
* It is meant to be implemented by {@link io.vertx.core.metrics.Measured} implementations but not exposed directly.
|
||||
*
|
||||
* @author <a href="mailto:julien@julienviet.com">Julien Viet</a>
|
||||
*/
|
||||
public interface MetricsObject extends Measured {
|
||||
public interface MetricsProvider extends Measured {
|
||||
|
||||
/**
|
||||
* Returns the metrics implementation.
|
||||
@@ -13,7 +13,7 @@ package io.vertx.test.fakemetrics;
|
||||
|
||||
import io.vertx.core.metrics.Measured;
|
||||
import io.vertx.core.spi.metrics.Metrics;
|
||||
import io.vertx.core.spi.metrics.MetricsObject;
|
||||
import io.vertx.core.spi.metrics.MetricsProvider;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:julien@julienviet.com">Julien Viet</a>
|
||||
@@ -21,7 +21,7 @@ import io.vertx.core.spi.metrics.MetricsObject;
|
||||
public class FakeMetricsBase implements Metrics {
|
||||
|
||||
public static <M extends FakeMetricsBase> M getMetrics(Measured measured) {
|
||||
return (M) ((MetricsObject) measured).getMetrics();
|
||||
return (M) ((MetricsProvider) measured).getMetrics();
|
||||
}
|
||||
|
||||
public FakeMetricsBase() {
|
||||
|
||||
Reference in New Issue
Block a user