org.crazycake.shiro
类 RedisCache<K,V>
java.lang.Object
org.crazycake.shiro.RedisCache<K,V>
- 所有已实现的接口:
- org.apache.shiro.cache.Cache<K,V>
public class RedisCache<K,V>
- extends Object
- implements org.apache.shiro.cache.Cache<K,V>
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RedisCache
public RedisCache(IRedisManager redisManager,
RedisSerializer keySerializer,
RedisSerializer valueSerializer,
String prefix,
int expire,
String principalIdFieldName)
- Construction
- 参数:
redisManager -
get
public V get(K key)
throws org.apache.shiro.cache.CacheException
- 指定者:
- 接口
org.apache.shiro.cache.Cache<K,V> 中的 get
- 抛出:
org.apache.shiro.cache.CacheException
put
public V put(K key,
V value)
throws org.apache.shiro.cache.CacheException
- 指定者:
- 接口
org.apache.shiro.cache.Cache<K,V> 中的 put
- 抛出:
org.apache.shiro.cache.CacheException
remove
public V remove(K key)
throws org.apache.shiro.cache.CacheException
- 指定者:
- 接口
org.apache.shiro.cache.Cache<K,V> 中的 remove
- 抛出:
org.apache.shiro.cache.CacheException
clear
public void clear()
throws org.apache.shiro.cache.CacheException
- 指定者:
- 接口
org.apache.shiro.cache.Cache<K,V> 中的 clear
- 抛出:
org.apache.shiro.cache.CacheException
size
public int size()
- 指定者:
- 接口
org.apache.shiro.cache.Cache<K,V> 中的 size
keys
public Set<K> keys()
- 指定者:
- 接口
org.apache.shiro.cache.Cache<K,V> 中的 keys
values
public Collection<V> values()
- 指定者:
- 接口
org.apache.shiro.cache.Cache<K,V> 中的 values
getKeyPrefix
public String getKeyPrefix()
setKeyPrefix
public void setKeyPrefix(String keyPrefix)
getPrincipalIdFieldName
public String getPrincipalIdFieldName()
setPrincipalIdFieldName
public void setPrincipalIdFieldName(String principalIdFieldName)
Copyright © 2018. All rights reserved.