org.crazycake.shiro
类 BaseRedisManager

java.lang.Object
  继承者 org.crazycake.shiro.BaseRedisManager
所有已实现的接口:
IRedisManager
直接已知子类:
RedisManager, RedisSentinelManager

public abstract class BaseRedisManager
extends Object
implements IRedisManager

Abstract class of RedisManager.


字段摘要
protected static int DEFAULT_COUNT
          Default value of count.
protected static int DEFAULT_EXPIRE
          Expire time in seconds.
 
构造方法摘要
BaseRedisManager()
           
 
方法摘要
 Long dbSize(byte[] pattern)
          Return the size of redis db.
 void del(byte[] key)
          Delete a key-value pair.
 byte[] get(byte[] key)
          get value from redis
 int getCount()
           
protected abstract  redis.clients.jedis.Jedis getJedis()
          We are going to operate redis by acquiring Jedis object.
 redis.clients.jedis.JedisPoolConfig getJedisPoolConfig()
           
 Set<byte[]> keys(byte[] pattern)
          Return all the keys of Redis db.
 byte[] set(byte[] key, byte[] value, int exipreTime)
          set
 void setCount(int count)
           
 void setJedisPoolConfig(redis.clients.jedis.JedisPoolConfig jedisPoolConfig)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

DEFAULT_EXPIRE

protected static final int DEFAULT_EXPIRE
Expire time in seconds.

另请参见:
常量字段值

DEFAULT_COUNT

protected static final int DEFAULT_COUNT
Default value of count.

另请参见:
常量字段值
构造方法详细信息

BaseRedisManager

public BaseRedisManager()
方法详细信息

getJedis

protected abstract redis.clients.jedis.Jedis getJedis()
We are going to operate redis by acquiring Jedis object. The subclass should realizes the way to get Jedis objects by implement the getJedis().

返回:
Jedis

get

public byte[] get(byte[] key)
get value from redis

指定者:
接口 IRedisManager 中的 get
参数:
key -
返回:
value

set

public byte[] set(byte[] key,
                  byte[] value,
                  int exipreTime)
set

指定者:
接口 IRedisManager 中的 set
参数:
key -
value -
exipreTime -
返回:
value

del

public void del(byte[] key)
Delete a key-value pair.

指定者:
接口 IRedisManager 中的 del
参数:
key -

dbSize

public Long dbSize(byte[] pattern)
Return the size of redis db.

指定者:
接口 IRedisManager 中的 dbSize

keys

public Set<byte[]> keys(byte[] pattern)
Return all the keys of Redis db. Filtered by pattern.

指定者:
接口 IRedisManager 中的 keys
参数:
pattern -
返回:

getCount

public int getCount()

setCount

public void setCount(int count)

getJedisPoolConfig

public redis.clients.jedis.JedisPoolConfig getJedisPoolConfig()

setJedisPoolConfig

public void setJedisPoolConfig(redis.clients.jedis.JedisPoolConfig jedisPoolConfig)


Copyright © 2018. All rights reserved.