Search in sources :

Example 1 with PageModel

use of com.albedo.java.common.core.vo.PageModel in project albedo by somowhere.

the class RedisServiceImpl method getRedisInfo.

/**
 * Redis详细信息
 */
@Override
public IPage<RedisInfo> getRedisInfo() {
    Properties info = redisConnectionFactory.getConnection().info();
    List<RedisInfo> infoList = new ArrayList<>();
    RedisInfo redisInfo;
    for (Map.Entry<Object, Object> entry : info.entrySet()) {
        redisInfo = new RedisInfo();
        redisInfo.setKey(StringUtil.toString(entry.getKey()));
        redisInfo.setValue(StringUtil.toString(entry.getValue()));
        infoList.add(redisInfo);
    }
    return new PageModel<>(infoList, infoList.size());
}
Also used : ArrayList(java.util.ArrayList) JSONObject(cn.hutool.json.JSONObject) PageModel(com.albedo.java.common.core.vo.PageModel) Properties(java.util.Properties) RedisInfo(com.albedo.java.modules.monitor.domain.RedisInfo) BeanMap(org.springframework.cglib.beans.BeanMap) Map(java.util.Map)

Aggregations

JSONObject (cn.hutool.json.JSONObject)1 PageModel (com.albedo.java.common.core.vo.PageModel)1 RedisInfo (com.albedo.java.modules.monitor.domain.RedisInfo)1 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1 Properties (java.util.Properties)1 BeanMap (org.springframework.cglib.beans.BeanMap)1