List of usage examples for org.springframework.data.redis.core ListOperations size
@Nullable Long size(K key);
From source file:com.company.project.service.dao.RedisDao.java
/** * Count elements of a list/*from ww w . java2s . com*/ * @param key * @return number of element/s */ public long countList(String key) { ListOperations opsForList = redisTemplate.opsForList(); return opsForList.size(key); }