public class PropertyStoreRedis extends AbstractPropertyStore
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_PROPERTY
prefix of keys.
|
protected int |
timeToLive
time to live.
|
| Constructor and Description |
|---|
PropertyStoreRedis()
Default Constructor.
|
PropertyStoreRedis(RedisConnection pRedisConnection)
Contact remote redis server.
|
PropertyStoreRedis(String xmlFeaturesfFile)
Default Constructor.
|
PropertyStoreRedis(String host,
int port)
Contact remote redis server.
|
PropertyStoreRedis(String host,
int port,
String xmlFeaturesfFile)
Contact remote redis server.
|
PropertyStoreRedis(String host,
int port,
String password,
String xmlFeaturesfFile)
Contact remote redis server.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
<T> void |
createProperty(Property<T> prop) |
void |
deleteProperty(String name) |
boolean |
existProperty(String name) |
redis.clients.jedis.Jedis |
getJedis()
Safe acces to Jedis, avoid JNPE.
|
RedisConnection |
getRedisConnection()
Getter accessor for attribute 'redisConnection'.
|
int |
getTimeToLive()
Getter accessor for attribute 'timeToLive'.
|
Set<String> |
listPropertyNames() |
Map<String,Property<?>> |
readAllProperties() |
Property<?> |
readProperty(String name) |
void |
setRedisConnection(RedisConnection redisConnection)
Setter accessor for attribute 'redisConnection'.
|
void |
setTimeToLive(int timeToLive)
Setter accessor for attribute 'timeToLive'.
|
assertPropertyName, importPropertiesFromXmlFile, isEmpty, toJson, updateProperty, updatePropertypublic static final String KEY_PROPERTY
protected int timeToLive
public PropertyStoreRedis()
public PropertyStoreRedis(RedisConnection pRedisConnection)
host - target redis hostport - target redis portpublic PropertyStoreRedis(String xmlFeaturesfFile)
public PropertyStoreRedis(String host, int port)
host - target redis hostport - target redis portpublic PropertyStoreRedis(String host, int port, String password, String xmlFeaturesfFile)
host - target redis hostport - target redis portpublic boolean existProperty(String name)
public <T> void createProperty(Property<T> prop)
public void deleteProperty(String name)
public void clear()
public int getTimeToLive()
public void setTimeToLive(int timeToLive)
timeToLive - new value for 'timeToLive 'public RedisConnection getRedisConnection()
public void setRedisConnection(RedisConnection redisConnection)
redisConnection - new value for 'redisConnection 'public redis.clients.jedis.Jedis getJedis()
Copyright © 2013–2016 FF4J. All rights reserved.