public class RedisService extends Object implements DbService, Runnable
Copyright © Enremmeta LLC 2015. All Rights Reserved.
Modifier and Type | Field and Description |
---|---|
private com.lambdaworks.redis.RedisClient |
client |
private RedisServiceConfig |
config |
private int |
curVarzaPtr |
private int |
poolSize |
private int |
poolTtlMinutes |
private com.lambdaworks.redis.RedisAsyncConnection<String,String>[] |
varzas |
Constructor and Description |
---|
RedisService() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
(package private) RedisServiceConfig |
getConfig() |
(package private) com.lambdaworks.redis.RedisAsyncConnection<String,String> |
getConnection() |
int |
getCurVarzaPtr()
Completely threadunsafe.
|
<T> DaoCache<T> |
getDaoCache(DaoCacheLoader<T> loader,
T nullValue,
long ttl,
long maxItems) |
<T> DaoCacheLoader<T> |
getDaoCacheLoader() |
DaoCounters |
getDaoCounters() |
DaoMapOfUserAttributes |
getDaoMapOfUserAttributes() |
DaoMapOfUserSegments |
getDaoMapOfUserSegments() |
<T> DaoShortLivedMap<T> |
getDaoShortLivedMap() |
<T> DaoShortLivedMap<T> |
getDaoShortLivedMap(Class<T> type) |
void |
init(DbConfig config) |
void |
refreshPool() |
void |
run() |
private RedisServiceConfig config
private com.lambdaworks.redis.RedisClient client
private int poolSize
private int poolTtlMinutes
private int curVarzaPtr
public void init(DbConfig config) throws Lot49Exception
init
in interface DbService
Lot49Exception
public int getCurVarzaPtr()
public void refreshPool()
public void close()
public <T> DaoShortLivedMap<T> getDaoShortLivedMap(Class<T> type)
getDaoShortLivedMap
in interface DbService
RedisServiceConfig getConfig()
public <T> DaoShortLivedMap<T> getDaoShortLivedMap()
getDaoShortLivedMap
in interface DbService
public <T> DaoCacheLoader<T> getDaoCacheLoader()
getDaoCacheLoader
in interface DbService
public <T> DaoCache<T> getDaoCache(DaoCacheLoader<T> loader, T nullValue, long ttl, long maxItems)
getDaoCache
in interface DbService
public DaoCounters getDaoCounters()
getDaoCounters
in interface DbService
public DaoMapOfUserAttributes getDaoMapOfUserAttributes()
getDaoMapOfUserAttributes
in interface DbService
public DaoMapOfUserSegments getDaoMapOfUserSegments()
getDaoMapOfUserSegments
in interface DbService