Java Code Examples for org.springframework.data.redis.core.SetOperations#members()
The following examples show how to use
org.springframework.data.redis.core.SetOperations#members() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RedisCacheUtils.java From sophia_scaffolding with Apache License 2.0 | 5 votes |
public Set<T> getSet(String k) { String key = GlobalsConstants.KEY_SET_PREFIX + k; logger.debug("getSet key [{}]", key); try { SetOperations<String, T> setOps = redisTemplate.opsForSet(); return setOps.members(key); } catch (Throwable t) { logger.error("getSet key [{}] exception!", key, t); throw new CommonException(t); } }
Example 2
Source File: RedisCacheUtils.java From sophia_scaffolding with Apache License 2.0 | 5 votes |
public Set<T> getSet(String k) { String key = GlobalsConstants.KEY_SET_PREFIX + k; logger.debug("getSet key [{}]", key); try { SetOperations<String, T> setOps = redisTemplate.opsForSet(); return setOps.members(key); } catch (Throwable t) { logger.error("getSet key [{}] exception!", key, t); throw new CommonException(t); } }
Example 3
Source File: RedisCacheUtils.java From sophia_scaffolding with Apache License 2.0 | 5 votes |
public Set<T> getSet(String k) { String key = GlobalsConstants.KEY_SET_PREFIX + k; logger.debug("getSet key [{}]", key); try { SetOperations<String, T> setOps = redisTemplate.opsForSet(); return setOps.members(key); } catch (Throwable t) { logger.error("getSet key [{}] exception!", key, t); throw new CommonException(t); } }
Example 4
Source File: RedisSetServiceImpl.java From paascloud-master with Apache License 2.0 | 5 votes |
@Override public Set<String> getAllValue(String key) { Set<String> result; SetOperations<String, String> setOps = rt.opsForSet(); result = setOps.members(key); log.info("getAllValue - 根据key获取元素. [OK] key={}, value={}", key, result); return result; }
Example 5
Source File: CommonRedisDaoImpl.java From SpringBootUnity with MIT License | 5 votes |
/** * 获取缓存set数据 * * @param k key * @return set */ @Override public Set<String> getSet(String k) { try { SetOperations<String, String> setOps = redisTemplate.opsForSet(); return setOps.members(KEY_PREFIX_SET + k); } catch (Throwable t) { LOGGER.error("获取set缓存失败key[" + KEY_PREFIX_SET + k + ", Codeor[" + t + "]"); } return null; }
Example 6
Source File: CacheServiceProvider.java From AsuraFramework with Apache License 2.0 | 4 votes |
@Override public Set<String> rangeSet(final String key) { final SetOperations<String, String> operation = redisTemplate.opsForSet(); final Set<String> value = operation.members(getKey(key)); return value; }