List of usage examples for org.springframework.data.redis.core SetOperations size
@Nullable Long size(K key);
From source file:com.company.project.service.dao.RedisDao.java
/** * get number of elements of a set/*from www . j a v a 2s . co m*/ * @param key * @return */ public long sizeUsingOpsForSet(String key) { SetOperations opsForSet = redisTemplate.opsForSet(); return opsForSet.size(key); }