Package org.nuxeo.ecm.core.cache
Class CacheDescriptor
- java.lang.Object
-
- org.nuxeo.ecm.core.cache.CacheDescriptor
-
- All Implemented Interfaces:
Descriptor
public class CacheDescriptor extends Object implements Descriptor
Descriptor of cache contrib- Since:
- 6.0
-
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_MAX_SIZEDefault max sizestatic longDEFAULT_TTLDefault TTL in minutes.protected Class<? extends CacheManagement>klassStringnamestatic StringOPTION_CONCURRENCY_LEVELstatic StringOPTION_MAX_SIZEMaximum number of entries the cache may contain.Map<String,String>optionsbooleanremove-
Fields inherited from interface org.nuxeo.runtime.model.Descriptor
UNIQUE_DESCRIPTOR_ID
-
-
Constructor Summary
Constructors Constructor Description CacheDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandoesRemove()During merge if a descriptor whose doesRemove() returns true is encountered, the merge chain is reset and started again on next descriptor.StringgetId()The descriptor id, descriptors with same id are merged.longgetTTL()Descriptormerge(Descriptor o)Returns a descriptor representingothermerged intothisvoidsetTTL(Long value)
-
-
-
Field Detail
-
DEFAULT_TTL
public static final long DEFAULT_TTL
Default TTL in minutes.- See Also:
- Constant Field Values
-
DEFAULT_MAX_SIZE
public static final long DEFAULT_MAX_SIZE
Default max size- Since:
- 9.3
- See Also:
- Constant Field Values
-
OPTION_MAX_SIZE
public static final String OPTION_MAX_SIZE
Maximum number of entries the cache may contain.- Since:
- 9.3
- See Also:
- Constant Field Values
-
OPTION_CONCURRENCY_LEVEL
public static final String OPTION_CONCURRENCY_LEVEL
- Since:
- 9.3
- See Also:
- Constant Field Values
-
name
public String name
-
remove
public boolean remove
-
klass
protected Class<? extends CacheManagement> klass
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:DescriptorThe descriptor id, descriptors with same id are merged.To forbid multiple descriptors use UNIQUE_DESCRIPTOR_ID.
To forbid merge use a unique value, non-overriden
toString()for exemple.- Specified by:
getIdin interfaceDescriptor
-
getTTL
public long getTTL()
-
setTTL
public void setTTL(Long value)
-
merge
public Descriptor merge(Descriptor o)
Description copied from interface:DescriptorReturns a descriptor representingothermerged intothisDefault implementation returns
other.- Specified by:
mergein interfaceDescriptor- Returns:
- the merged descriptor
-
doesRemove
public boolean doesRemove()
Description copied from interface:DescriptorDuring merge if a descriptor whose doesRemove() returns true is encountered, the merge chain is reset and started again on next descriptor.If the last descriptor of same id doesRemove() return true, the descriptor for this id will be
null.- Specified by:
doesRemovein interfaceDescriptor
-
-