public class RedisComponent extends DefaultComponent implements RedisAdmin
Modifier and Type | Class and Description |
---|---|
static class |
RedisComponent.RedisPoolDescriptorRegistry |
Modifier and Type | Field and Description |
---|---|
protected String |
delsha |
protected RedisExecutor |
executor |
protected RedisComponent.RedisPoolDescriptorRegistry |
registry |
lastModified
Constructor and Description |
---|
RedisComponent() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
Long |
clear(String pattern)
Clear keys in redis
|
<T> T |
getAdapter(Class<T> adapter)
Returns an object which is an instance of the given class associated with this object.
|
int |
getApplicationStartedOrder()
The component notification order for
Component.applicationStarted(org.nuxeo.runtime.model.ComponentContext) . |
RedisPoolDescriptor |
getConfig() |
void |
handleNewExecutor(RedisExecutor executor) |
String |
load(String bundleName,
String scriptName)
Load script in redis
|
String |
namespace(String... names) |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
registerRedisPoolDescriptor(RedisPoolDescriptor contrib) |
void |
start(ComponentContext context)
Start the component.
|
void |
stop(ComponentContext context)
Stop the component.
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterRedisPoolDescriptor(RedisPoolDescriptor contrib) |
deactivate, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted
protected volatile RedisExecutor executor
protected RedisComponent.RedisPoolDescriptorRegistry registry
public RedisComponent()
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public void registerRedisPoolDescriptor(RedisPoolDescriptor contrib)
public void unregisterRedisPoolDescriptor(RedisPoolDescriptor contrib)
public RedisPoolDescriptor getConfig()
getConfig
in interface RedisAdmin
public void start(ComponentContext context)
Component
start
in interface Component
start
in class DefaultComponent
public void stop(ComponentContext context)
Component
stop
in interface Component
stop
in class DefaultComponent
public int getApplicationStartedOrder()
Component
Component.applicationStarted(org.nuxeo.runtime.model.ComponentContext)
.
Components are notified in increasing order. Order 1000 is the default order for components that don't care. Order 100 is the repository initialization.
getApplicationStartedOrder
in interface Component
public void handleNewExecutor(RedisExecutor executor)
public Long clear(String pattern)
RedisAdmin
clear
in interface RedisAdmin
public String load(String bundleName, String scriptName)
RedisAdmin
load
in interface RedisAdmin
public <T> T getAdapter(Class<T> adapter)
Adaptable
null
if no such object can be found.getAdapter
in interface Adaptable
getAdapter
in class DefaultComponent
adapter
- the adapter class to look upnull
if this object does not have an adapter for
the given classpublic String namespace(String... names)
namespace
in interface RedisAdmin
Copyright © 2017 Nuxeo. All rights reserved.