public class CacheDescriptor extends Object implements Descriptor
| Modifier and Type | Field and Description | 
|---|---|
static long | 
DEFAULT_MAX_SIZE
Default max size 
 | 
static long | 
DEFAULT_TTL
Default TTL in minutes. 
 | 
protected Class<? extends CacheManagement> | 
klass  | 
String | 
name  | 
static String | 
OPTION_CONCURRENCY_LEVEL  | 
static String | 
OPTION_MAX_SIZE
Maximum number of entries the cache may contain. 
 | 
Map<String,String> | 
options  | 
boolean | 
remove  | 
UNIQUE_DESCRIPTOR_ID| Constructor and Description | 
|---|
CacheDescriptor()  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
doesRemove()
During merge if a descriptor whose doesRemove() returns true is encountered, the merge chain is reset and started
 again on next descriptor. 
 | 
String | 
getId()
The descriptor id, descriptors with same id are merged. 
 | 
long | 
getTTL()  | 
Descriptor | 
merge(Descriptor o)
Returns a descriptor representing  
other merged into this | 
void | 
setTTL(Long value)  | 
public static final long DEFAULT_TTL
public static final long DEFAULT_MAX_SIZE
public static final String OPTION_MAX_SIZE
public static final String OPTION_CONCURRENCY_LEVEL
public boolean remove
protected Class<? extends CacheManagement> klass
public CacheDescriptor()
public String getId()
DescriptorTo forbid multiple descriptors use UNIQUE_DESCRIPTOR_ID.
 To forbid merge use a unique value, non-overriden toString() for exemple.
getId in interface Descriptorpublic long getTTL()
public Descriptor merge(Descriptor o)
Descriptorother merged into this
 
 Default implementation returns other.
merge in interface Descriptorpublic boolean doesRemove()
Descriptor
 If the last descriptor of same id doesRemove() return true, the descriptor for this id will be null.
doesRemove in interface DescriptorCopyright © 2019 Nuxeo. All rights reserved.