public class FeatureCacheProviderRedis extends Object implements FF4JCacheManager
| Modifier and Type | Field and Description |
|---|---|
static String |
FEATURE_IDENTIFIER_PARAM_0_CANNOT_BE_NULL_NOR_EMPTY |
static String |
KEY_FEATURE
prefix of keys.
|
static String |
KEY_PROPERTY
prefix of keys.
|
protected int |
timeToLive
time to live.
|
| Constructor and Description |
|---|
FeatureCacheProviderRedis() |
FeatureCacheProviderRedis(String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearFeatures() |
void |
clearProperties() |
void |
evictFeature(String uid) |
void |
evictProperty(String propertyName) |
String |
getCacheProviderName() |
Feature |
getFeature(String uid) |
Object |
getFeatureNativeCache() |
redis.clients.jedis.Jedis |
getJedis()
Safe acces to Jedis, avoid JNPE.
|
Property<?> |
getProperty(String propertyName) |
Object |
getPropertyNativeCache() |
RedisConnection |
getRedisConnection()
Getter accessor for attribute 'redisConnection'.
|
Set<String> |
listCachedFeatureNames() |
Set<String> |
listCachedPropertyNames() |
void |
putFeature(Feature fp) |
void |
putProperty(Property<?> property) |
void |
setRedisConnection(RedisConnection redisConnection)
Setter accessor for attribute 'redisConnection'.
|
public static final String KEY_FEATURE
public static final String KEY_PROPERTY
public static final String FEATURE_IDENTIFIER_PARAM_0_CANNOT_BE_NULL_NOR_EMPTY
protected int timeToLive
public FeatureCacheProviderRedis()
public FeatureCacheProviderRedis(String host, int port)
public Set<String> listCachedFeatureNames()
listCachedFeatureNames in interface FF4JCacheManagerpublic String getCacheProviderName()
getCacheProviderName in interface FF4JCacheManagerpublic void clearFeatures()
clearFeatures in interface FF4JCacheManagerpublic void clearProperties()
clearProperties in interface FF4JCacheManagerpublic void evictFeature(String uid)
evictFeature in interface FF4JCacheManagerpublic void evictProperty(String propertyName)
evictProperty in interface FF4JCacheManagerpublic void putFeature(Feature fp)
putFeature in interface FF4JCacheManagerpublic void putProperty(Property<?> property)
putProperty in interface FF4JCacheManagerpublic Feature getFeature(String uid)
getFeature in interface FF4JCacheManagerpublic Property<?> getProperty(String propertyName)
getProperty in interface FF4JCacheManagerpublic Set<String> listCachedPropertyNames()
listCachedPropertyNames in interface FF4JCacheManagerpublic Object getFeatureNativeCache()
getFeatureNativeCache in interface FF4JCacheManagerpublic Object getPropertyNativeCache()
getPropertyNativeCache in interface FF4JCacheManagerpublic redis.clients.jedis.Jedis getJedis()
public RedisConnection getRedisConnection()
public void setRedisConnection(RedisConnection redisConnection)
redisConnection - new value for 'redisConnection 'Copyright © 2013–2016 FF4J. All rights reserved.