public class RedisServiceImpl extends DefaultComponent implements RedisService
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_PREFIX |
Constructor and Description |
---|
RedisServiceImpl() |
Modifier and Type | Method and Description |
---|---|
redis.clients.jedis.JedisPool |
getJedisPool()
Gets the configured Jedis pool, or
null if not configured. |
String |
getPrefix()
Gets the prefix to use when construction Redis keys.
|
void |
registerConfiguration(RedisConfigurationDescriptor desc) |
void |
registerExtension(Extension extension)
Registers the given extension.
|
void |
unregisterConfiguration(RedisConfigurationDescriptor desc) |
void |
unregisterExtension(Extension extension)
Unregisters the given extension.
|
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerContribution, setLastModified, unregisterContribution
public static final String DEFAULT_PREFIX
public void registerExtension(Extension extension)
Extensible
registerExtension
in interface Extensible
registerExtension
in class DefaultComponent
extension
- the extension to registerpublic void unregisterExtension(Extension extension)
Extensible
unregisterExtension
in interface Extensible
unregisterExtension
in class DefaultComponent
extension
- the extension to unregisterpublic void registerConfiguration(RedisConfigurationDescriptor desc)
public void unregisterConfiguration(RedisConfigurationDescriptor desc)
public redis.clients.jedis.JedisPool getJedisPool()
RedisService
null
if not configured.
From the pool, you get a Jedis
connection using Pool.getResource()
, which MUST BE FOLLOWED by
a try
and a finally
block in which
JedisPool.returnResource(redis.clients.jedis.BinaryJedis)
MUST BE CALLED.
getJedisPool
in interface RedisService
null
if nonepublic String getPrefix()
RedisService
getPrefix
in interface RedisService
Copyright © 2013 Nuxeo SA. All Rights Reserved.