Example usage for org.springframework.data.redis.connection RedisConnection getClientList

List of usage examples for org.springframework.data.redis.connection RedisConnection getClientList

Introduction

In this page you can find the example usage for org.springframework.data.redis.connection RedisConnection getClientList.

Prototype

@Nullable
List<RedisClientInfo> getClientList();

Source Link

Document

Request information and statistics about connected clients.

Usage

From source file:com.zxy.commons.cache.RedisUtils.java

/**
 * Request information and statistics about connected clients.
 * <p>/*ww w .  j a v  a2  s.  com*/
 * See http://redis.io/commands/client-list
 * 
 * @return {@link List} of {@link RedisClientInfo} objects.
 * @since 1.3
 */
public static List<RedisClientInfo> getClientList() {
    return redisTemplate.execute(new RedisCallback<List<RedisClientInfo>>() {
        @Override
        public List<RedisClientInfo> doInRedis(RedisConnection redis) throws DataAccessException {
            return redis.getClientList();
        }
    });
}

From source file:com.zxy.commons.cache.RedisHelper.java

/**
 * Request information and statistics about connected clients.
 * <p>/*from   www  .  j a  v a2s  . co m*/
 * See http://redis.io/commands/client-list
 * 
 * @return {@link List} of {@link RedisClientInfo} objects.
 * @since 1.3
 */
public List<RedisClientInfo> getClientList() {
    return redisTemplate.execute(new RedisCallback<List<RedisClientInfo>>() {
        @Override
        public List<RedisClientInfo> doInRedis(RedisConnection redis) throws DataAccessException {
            return redis.getClientList();
        }
    });
}