首页  

aerospike ClusterStats 获取连接数信息     所属分类 aerospike 浏览量 734
ClusterStats NodeStats
获取连接数信息 使用中 和 空闲的

注意 aerospike-client 版本 ,低版本没有 ClusterStats
4.3.1 可以使用

import com.aerospike.client.IAerospikeClient;
import com.aerospike.client.cluster.ClusterStats;
import com.aerospike.client.cluster.NodeStats;

public class StatTest {
    public static void main(String[] args) throws Exception {
        IAerospikeClient client = AsClientUtil.getClient();
        System.out.println("client=" + client);

        ClusterStats slusterStats = client.getClusterStats();
        NodeStats[] nodeStats = slusterStats.nodes;
        for (NodeStats item : nodeStats) {
            // (inUse,inPool)
            // BB900DEAAAFAFFA 192.168.0.10 3000 sync(0,0) async(0,0)
            System.out.println(item);
        }
    }
}

https://gitee.com/dyyx/asdemo/blob/master/src/main/java/demo/StatTest.java

上一篇     下一篇
Java8常用函数式接口

java8 lambda 原理及性能

aerospike 日志

alpinelinux

中证海外中国互联网30指数

性能火焰图要点