All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netflix.astyanax.connectionpool.NodeDiscoveryMonitor Maven / Gradle / Ivy

There is a newer version: 3.10.2
Show newest version
package com.netflix.astyanax.connectionpool;

public class NodeDiscoveryMonitor implements NodeDiscoveryMonitorMBean {

    private NodeDiscovery discovery;

    public NodeDiscoveryMonitor(NodeDiscovery discovery) {
        this.discovery = discovery;
    }

    @Override
    public long getRefreshCount() {
        return discovery.getRefreshCount();
    }

    @Override
    public long getErrorCount() {
        return discovery.getErrorCount();
    }

    @Override
    public String getLastException() {
        Exception e = discovery.getLastException();
        return (e != null) ? e.getMessage() : "none";
    }

    @Override
    public String getLastRefreshTime() {
        return discovery.getLastRefreshTime().toString();
    }

    @Override
    public String getRawHostList() {
        return discovery.getRawHostList();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy