类 SetCache<T>
java.lang.Object
cn.myafx.cache.base.BaseCache
cn.myafx.cache.base.RedisCache
cn.myafx.cache.base.SetCache<T>
- 所有已实现的接口:
IBaseCache,IRedisCache,ISetCache<T>,IValueCache<T>,AutoCloseable
- 直接已知子类:
SetDbCache
set 集合
-
嵌套类概要
嵌套类 -
字段概要
从类继承的字段 cn.myafx.cache.base.RedisCache
DefaultJsonMapper, keyConfig, mapper, nodeName, prefix, redis -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明long添加数据boolean添加数据long移除对象boolean移除对象booleanvalue是否存在获取集合long集合数量getRandomValue(int count, Object... args) 随机返回对象getRandomValue(Object... args) 随机返回一个对象两个集合运算,返回运算结果longjoinAndAdd(Object[] addArgs, Object[] firstArgs, Object[] secondArgs, SetOp op) 两个集合运算,并将运算结果存储到新集合boolean移动一个已存在对象到新集合返回并移除集合对象返回并移除一个集合对象游标方式读取数据从类继承的方法 cn.myafx.cache.base.RedisCache
close, contains, deserialize, expire, expire, getBytes, getCacheDb, getCacheKey, getDefault, getKeyConfig, getString, ping, remove, serialize, setJsonMapper从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 java.lang.AutoCloseable
close从接口继承的方法 cn.myafx.cache.base.IRedisCache
contains, expire, expire, getCacheDb, getCacheKey, getKeyConfig, ping, remove, setJsonMapper
-
构造器详细资料
-
SetCache
public SetCache(String node, String item, org.springframework.data.redis.connection.RedisConnection redisConnection, ICacheKey cacheKey, String prefix, Class<T> clazz) throws Exception SetCache- 参数:
node- 缓存key配置db节点item- 缓存key配置项redisConnection- RedisConnectioncacheKey- ICacheKeyprefix- 缓存前缀clazz- T.class- 抛出:
Exception
-
-
方法详细资料
-
add
添加数据 -
add
添加数据 -
get
获取集合 -
join
两个集合运算,返回运算结果 -
joinAndAdd
public long joinAndAdd(Object[] addArgs, Object[] firstArgs, Object[] secondArgs, SetOp op) throws Exception 两个集合运算,并将运算结果存储到新集合- 指定者:
joinAndAdd在接口中ISetCache<T>- 参数:
addArgs- 新集合缓存key参数firstArgs- 第一个集合缓存key参数secondArgs- 第二集合缓存key参数op- 操作- 返回:
- 抛出:
Exception
-
exist
value是否存在 -
getCount
集合数量 -
move
移动一个已存在对象到新集合 -
pop
返回并移除一个集合对象 -
pop
返回并移除集合对象 -
getRandomValue
随机返回一个对象- 指定者:
getRandomValue在接口中ISetCache<T>- 参数:
args- 缓存key参数- 返回:
- 抛出:
Exception
-
getRandomValue
随机返回对象- 指定者:
getRandomValue在接口中ISetCache<T>- 参数:
count- 数量args- 缓存key参数- 返回:
- 抛出:
Exception
-
delete
移除对象 -
delete
移除对象 -
scan
游标方式读取数据
-