public class CacheServiceImpl extends DefaultComponent implements CacheService
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
CacheServiceImpl.AbstractCachePubSubInvalidator  | 
static class  | 
CacheServiceImpl.CacheInvalidation  | 
protected class  | 
CacheServiceImpl.CachePubSubInvalidator  | 
| Modifier and Type | Field and Description | 
|---|---|
static String | 
CACHE_INVAL_PUBSUB_TOPIC  | 
protected Map<String,CacheManagement> | 
caches
Currently registered caches. 
 | 
static String | 
CLUSTERING_ENABLED_PROP
Framework property defining whether clustering is enabled. 
 | 
static String | 
DEFAULT_CACHE_ID  | 
protected CacheServiceImpl.CachePubSubInvalidator | 
invalidator  | 
static String | 
NODE_ID_PROP
Framework property containing the node id. 
 | 
protected static Random | 
RANDOM  | 
protected boolean | 
started  | 
static String | 
XP_CACHES  | 
lastModified, name| Constructor and Description | 
|---|
CacheServiceImpl()  | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
getApplicationStartedOrder()
The component notification order for  
Component.applicationStarted(org.nuxeo.runtime.model.ComponentContext). | 
Cache | 
getCache(String name)
Gets the cache with the given name. 
 | 
CacheDescriptor | 
getCacheDescriptor(String descriptor)  | 
protected void | 
maybeStart(String name)  | 
void | 
registerCache(String name)
Programmatically registers a cache with the given name, with the the size and the timeout given by the default
 cache. 
 | 
void | 
registerCache(String name,
             int maxSize,
             int timeout)
Deprecated.  
 | 
void | 
start(ComponentContext context)
Start the component. 
 | 
protected void | 
startCacheDescriptor(CacheDescriptor desc)
Creates and starts the cache. 
 | 
void | 
stop(ComponentContext context)
Stop the component. 
 | 
activate, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, unregister, unregisterContribution, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicationStartedpublic static final String XP_CACHES
public static final String DEFAULT_CACHE_ID
public static final String CACHE_INVAL_PUBSUB_TOPIC
public static final String CLUSTERING_ENABLED_PROP
public static final String NODE_ID_PROP
protected boolean started
protected final Map<String,CacheManagement> caches
protected CacheServiceImpl.CachePubSubInvalidator invalidator
public CacheServiceImpl()
@Deprecated public void registerCache(String name, int maxSize, int timeout)
CacheServiceregisterCache in interface CacheServicename - the cache namemaxSize - the maximum number of elementstimeout - the entry timeout (in minutes)public void registerCache(String name)
CacheServiceregisterCache in interface CacheServicename - the cache namepublic int getApplicationStartedOrder()
ComponentComponent.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 Componentpublic void start(ComponentContext context)
Componentstart in interface Componentstart in class DefaultComponentprotected void startCacheDescriptor(CacheDescriptor desc)
public void stop(ComponentContext context) throws InterruptedException
Componentstop in interface Componentstop in class DefaultComponentInterruptedExceptionprotected void maybeStart(String name)
public Cache getCache(String name)
CacheServicegetCache in interface CacheServicename - the cache namenull if it does not existpublic CacheDescriptor getCacheDescriptor(String descriptor)
Copyright © 2019 Nuxeo. All rights reserved.