Search in sources :

Example 1 with NoopNodeMetricUpdater

use of com.datastax.oss.driver.internal.core.metrics.NoopNodeMetricUpdater in project java-driver by datastax.

the class DefaultNode method setEndPoint.

public void setEndPoint(@NonNull EndPoint newEndPoint, @NonNull InternalDriverContext context) {
    if (!newEndPoint.equals(endPoint)) {
        endPoint = newEndPoint;
        // The endpoint is also used to build metric names, so make sure they get updated
        NodeMetricUpdater previousMetricUpdater = metricUpdater;
        if (!(previousMetricUpdater instanceof NoopNodeMetricUpdater)) {
            metricUpdater = context.getMetricsFactory().newNodeUpdater(this);
        }
    }
}
Also used : NodeMetricUpdater(com.datastax.oss.driver.internal.core.metrics.NodeMetricUpdater) NoopNodeMetricUpdater(com.datastax.oss.driver.internal.core.metrics.NoopNodeMetricUpdater) NoopNodeMetricUpdater(com.datastax.oss.driver.internal.core.metrics.NoopNodeMetricUpdater)

Aggregations

NodeMetricUpdater (com.datastax.oss.driver.internal.core.metrics.NodeMetricUpdater)1 NoopNodeMetricUpdater (com.datastax.oss.driver.internal.core.metrics.NoopNodeMetricUpdater)1