类 LettuceCacheProvider
- 所有已实现的接口:
io.lettuce.core.pubsub.RedisPubSubListener<String,,String> CacheProvider,ClusterPolicy
public class LettuceCacheProvider
extends io.lettuce.core.pubsub.RedisPubSubAdapter<String,String>
implements CacheProvider, ClusterPolicy
使用 Lettuce 进行 Redis 的操作
配置信息:
lettuce.namespace =
lettuce.storage = generic
lettuce.scheme = redis|rediss|redis-sentinel
lettuce.hosts = 127.0.0.1:6379
lettuce.password =
lettuce.database = 0
lettuce.sentinelMasterId =
- 作者:
- Winter Lau (javayou@gmail.com)
-
字段概要
从接口继承的字段 net.oschina.j2cache.cluster.ClusterPolicy
log -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明buildCache(String region, long timeToLiveInSeconds, CacheExpiredListener listener) Configure the cache with timeToLiveInMillsbuildCache(String region, CacheExpiredListener listener) Configure the cachevoid清除本地整个缓存区域voidconnect(Properties props, CacheProviderHolder holder) 连接到集群void断开集群连接void删除本地某个缓存条目booleanisLocalCommand(Command cmd) 判断是否本地实例的命令intlevel()缓存的层级voidname()缓存的标识名称void发送消息regions()Return all channels defined in first level cachevoidstart(Properties props) Callback to perform any necessary initialization of the underlying cache implementation during SessionFactory construction.voidstop()Callback to perform any necessary cleanup of the underlying cache implementation during SessionFactory.close().从类继承的方法 io.lettuce.core.pubsub.RedisPubSubAdapter
message, psubscribed, punsubscribed, subscribed, unsubscribed从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 net.oschina.j2cache.CacheProvider
isLevel, removeCache从接口继承的方法 net.oschina.j2cache.cluster.ClusterPolicy
handleCommand, sendClearCmd, sendEvictCmd
-
构造器详细资料
-
LettuceCacheProvider
public LettuceCacheProvider()
-
-
方法详细资料
-
name
从接口复制的说明:CacheProvider缓存的标识名称- 指定者:
name在接口中CacheProvider- 返回:
- return cache provider name
-
level
public int level()从接口复制的说明:CacheProvider缓存的层级- 指定者:
level在接口中CacheProvider- 返回:
- current provider level
-
isLocalCommand
从接口复制的说明:ClusterPolicy判断是否本地实例的命令- 指定者:
isLocalCommand在接口中ClusterPolicy- 参数:
cmd- 命令信息- 返回:
- true if the cmd sent by self
-
start
从接口复制的说明:CacheProviderCallback to perform any necessary initialization of the underlying cache implementation during SessionFactory construction.- 指定者:
start在接口中CacheProvider- 参数:
props- current configuration settings.
-
stop
public void stop()从接口复制的说明:CacheProviderCallback to perform any necessary cleanup of the underlying cache implementation during SessionFactory.close().- 指定者:
stop在接口中CacheProvider
-
buildCache
从接口复制的说明:CacheProviderConfigure the cache- 指定者:
buildCache在接口中CacheProvider- 参数:
region- the name of the cache regionlistener- listener for expired elements- 返回:
- return cache instance
-
buildCache
从接口复制的说明:CacheProviderConfigure the cache with timeToLiveInMills- 指定者:
buildCache在接口中CacheProvider- 参数:
region- cache region nametimeToLiveInSeconds- time to live in secondlistener- listener for expired elements- 返回:
- return cache instance
-
regions
从接口复制的说明:CacheProviderReturn all channels defined in first level cache- 指定者:
regions在接口中CacheProvider- 返回:
- all regions name
-
evict
删除本地某个缓存条目- 指定者:
evict在接口中ClusterPolicy- 参数:
region- 区域名称keys- 缓存键值
-
clear
清除本地整个缓存区域- 指定者:
clear在接口中ClusterPolicy- 参数:
region- 区域名称
-
connect
从接口复制的说明:ClusterPolicy连接到集群- 指定者:
connect在接口中ClusterPolicy- 参数:
props- j2cache 配置信息holder- Cache Provider Instance
-
message
-
publish
从接口复制的说明:ClusterPolicy发送消息- 指定者:
publish在接口中ClusterPolicy- 参数:
cmd- command to send
-
disconnect
public void disconnect()从接口复制的说明:ClusterPolicy断开集群连接- 指定者:
disconnect在接口中ClusterPolicy
-