Modifier and Type | Field and Description |
---|---|
protected String |
cacheName |
protected String |
clientName |
protected Integer |
database |
protected String |
host |
protected redis.clients.jedis.JedisPoolConfig |
jedisPoolConfig |
protected IKeyNamingPolicy |
keyNamingPolicy |
protected String |
password |
protected Integer |
port |
protected ISerializer |
serializer |
protected Integer |
timeout |
Constructor and Description |
---|
RedisPlugin(String cacheName,
String host) |
RedisPlugin(String cacheName,
String host,
int port) |
RedisPlugin(String cacheName,
String host,
int port,
int timeout) |
RedisPlugin(String cacheName,
String host,
int port,
int timeout,
String password) |
RedisPlugin(String cacheName,
String host,
int port,
int timeout,
String password,
int database) |
RedisPlugin(String cacheName,
String host,
int port,
int timeout,
String password,
int database,
String clientName) |
RedisPlugin(String cacheName,
String host,
int port,
String password) |
RedisPlugin(String cacheName,
String host,
String password) |
Modifier and Type | Method and Description |
---|---|
redis.clients.jedis.JedisPoolConfig |
getJedisPoolConfig()
当RedisPlugin 提供的设置属性仍然无法满足需求时,通过此方法获取到
JedisPoolConfig 对象,可对 redis 进行更加细致的配置
|
void |
setKeyNamingPolicy(IKeyNamingPolicy keyNamingPolicy) |
void |
setMinEvictableIdleTimeMillis(int minEvictableIdleTimeMillis) |
void |
setNumTestsPerEvictionRun(int numTestsPerEvictionRun) |
void |
setSerializer(ISerializer serializer) |
void |
setTestWhileIdle(boolean testWhileIdle) |
void |
setTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis) |
boolean |
start() |
boolean |
stop() |
protected String cacheName
protected String host
protected Integer port
protected Integer timeout
protected String password
protected Integer database
protected String clientName
protected ISerializer serializer
protected IKeyNamingPolicy keyNamingPolicy
protected redis.clients.jedis.JedisPoolConfig jedisPoolConfig
public RedisPlugin(String cacheName, String host, int port, int timeout, String password)
public RedisPlugin(String cacheName, String host, int port, int timeout, String password, int database)
public RedisPlugin(String cacheName, String host, int port, int timeout, String password, int database, String clientName)
public redis.clients.jedis.JedisPoolConfig getJedisPoolConfig()
例如: redisPlugin.getJedisPoolConfig().setMaxTotal(100);
public void setSerializer(ISerializer serializer)
public void setKeyNamingPolicy(IKeyNamingPolicy keyNamingPolicy)
public void setTestWhileIdle(boolean testWhileIdle)
public void setMinEvictableIdleTimeMillis(int minEvictableIdleTimeMillis)
public void setTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis)
public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
Copyright © 2018. All rights reserved.