use of com.ctrip.xpipe.redis.core.protocal.cmd.InfoResultExtractor in project x-pipe by ctripcorp.
the class XRedisXpipeCommandTest method getSyncFull.
private Integer getSyncFull(RedisMeta redis) throws Exception {
SimpleObjectPool<NettyClient> keyPool = getXpipeNettyClientKeyedObjectPool().getKeyPool(new InetSocketAddress(redis.getIp(), redis.getPort()));
InfoCommand infoCommand = new InfoCommand(keyPool, InfoCommand.INFO_TYPE.STATS, scheduled);
String value = infoCommand.execute().get();
Integer sync_full = new InfoResultExtractor(value).extractAsInteger("sync_full");
return sync_full;
}
use of com.ctrip.xpipe.redis.core.protocal.cmd.InfoResultExtractor in project x-pipe by ctripcorp.
the class AbstractRedisTest method getInfoKey.
protected String getInfoKey(RedisMeta slaveMeta, String infoSection, String key) throws Exception {
SimpleObjectPool<NettyClient> keyPool = getXpipeNettyClientKeyedObjectPool().getKeyPool(new InetSocketAddress(slaveMeta.getIp(), slaveMeta.getPort()));
String info = new InfoCommand(keyPool, infoSection, scheduled).execute().get();
return new InfoResultExtractor(info).extract(key);
}
Aggregations