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>


构造方法摘要
RedisCache(IRedisManager redisManager, RedisSerializer keySerializer, RedisSerializer valueSerializer, String prefix, int expire, String principalIdFieldName)
          Construction
 
方法摘要
 void clear()
           
 V get(K key)
           
 String getKeyPrefix()
           
 String getPrincipalIdFieldName()
           
 Set<K> keys()
           
 V put(K key, V value)
           
 V remove(K key)
           
 void setKeyPrefix(String keyPrefix)
           
 void setPrincipalIdFieldName(String principalIdFieldName)
           
 int size()
           
 Collection<V> values()
           
 
从类 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.