public void process(CounterBasket pw) throws IOException { Configure conf = Configure.getInstance(); boolean redisEnabled = conf.getBoolean("redis_enabled", false); if (redisEnabled) { String serverIp = conf.getValue("redis_server_ip", "127.0.0.1"); int serverPort = conf.getInt("redis_server_port", 6379); String perfInfo = getRedisPerfInfo(serverIp, serverPort); String[] lines = perfInfo.split("\n"); PerfCounterPack p = pw.getPack(conf.getObjName(), TimeTypeEnum.REALTIME); for (String line : lines) { String key = line.substring(0, line.indexOf(':')); String value = line.substring(line.indexOf(':') + 1); if (floatSet.contains(key)) { p.put(key, new FloatValue(Float.valueOf(value.trim()))); } if (decimalSet.contains(key)) { p.put(key, new DecimalValue(Long.valueOf(value.trim()))); } } } }