Package org.nuxeo.ecm.core.cache
Class CacheDescriptor
java.lang.Object
org.nuxeo.ecm.core.cache.CacheDescriptor
- All Implemented Interfaces:
Descriptor
Descriptor of cache contrib
- Since:
- 6.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringstatic final longDeprecated, for removal: This API element is subject to removal in a future version.since 2025.18, the default is now given by contributionstatic final longDefault TTL in minutes.protected Class<? extends CacheManagement> static final Stringstatic final StringMaximum number of entries the cache may contain.booleanFields inherited from interface org.nuxeo.runtime.model.Descriptor
UNIQUE_DESCRIPTOR_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDuring merge if a descriptor whose doesRemove() returns true is encountered, the merge chain is reset and started again on next descriptor.Returns the descriptor id to copy for the current descriptor.getId()The descriptor id, descriptors with same id are merged.longgetTTL()merge(Descriptor o) Returns a descriptor representingothermerged intothisvoidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.model.Descriptor
copy
-
Field Details
-
DEFAULT_TTL
public static final long DEFAULT_TTLDefault TTL in minutes.- See Also:
-
DEFAULT_MAX_SIZE
Deprecated, for removal: This API element is subject to removal in a future version.since 2025.18, the default is now given by contributionDefault max size- Since:
- 9.3
- See Also:
-
OPTION_MAX_SIZE
Maximum number of entries the cache may contain.- Since:
- 9.3
- See Also:
-
OPTION_CONCURRENCY_LEVEL
- Since:
- 9.3
- See Also:
-
name
-
copy
-
remove
public boolean remove -
klass
-
options
-
-
Constructor Details
-
CacheDescriptor
public CacheDescriptor()
-
-
Method Details
-
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-overridden
toString()for example.- Specified by:
getIdin interfaceDescriptor
-
getCopyId
Description copied from interface:DescriptorReturns the descriptor id to copy for the current descriptor.The method returns null by default, this disables the copy mechanism.
- Specified by:
getCopyIdin interfaceDescriptor- Returns:
- the descriptor id to copy
-
getTTL
public long getTTL() -
setTTL
-
merge
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
-