public class RedisCacheProvider extends Object implements CacheProvider
| 构造器和说明 |
|---|
RedisCacheProvider() |
| 限定符和类型 | 方法和说明 |
|---|---|
Cache |
buildCache(String regionName,
boolean autoCreate,
CacheExpiredListener listener)
Configure the cache
|
static redis.clients.jedis.Jedis |
getResource() |
String |
name()
缓存的标识名称
|
static void |
returnResource(redis.clients.jedis.Jedis jedis,
boolean isBrokenResource)
释放资源
|
void |
start(Properties props)
Callback to perform any necessary initialization of the underlying cache implementation
during SessionFactory construction.
|
void |
stop()
Callback to perform any necessary cleanup of the underlying cache implementation
during SessionFactory.close().
|
public String name()
CacheProvidername 在接口中 CacheProviderpublic static void returnResource(redis.clients.jedis.Jedis jedis,
boolean isBrokenResource)
jedis - jedis instanceisBrokenResource - resource is ok or notpublic static redis.clients.jedis.Jedis getResource()
public Cache buildCache(String regionName, boolean autoCreate, CacheExpiredListener listener) throws CacheException
CacheProviderbuildCache 在接口中 CacheProviderregionName - the name of the cache regionautoCreate - autoCreate settingslistener - listener for expired elementsCacheException - cache exceptionpublic void start(Properties props) throws CacheException
CacheProviderstart 在接口中 CacheProviderprops - current configuration settings.CacheExceptionpublic void stop()
CacheProviderstop 在接口中 CacheProviderCopyright © 2015. All rights reserved.