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
Modifier and TypeFieldDescriptionstatic final long
Default max sizestatic final long
Default TTL in minutes.protected Class<? extends CacheManagement>
static final String
static final String
Maximum number of entries the cache may contain.boolean
Fields inherited from interface org.nuxeo.runtime.model.Descriptor
UNIQUE_DESCRIPTOR_ID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
During merge if a descriptor whose doesRemove() returns true is encountered, the merge chain is reset and started again on next descriptor.getId()
The descriptor id, descriptors with same id are merged.long
getTTL()
merge
(Descriptor o) Returns a descriptor representingother
merged intothis
void
-
Field Details
-
DEFAULT_TTL
public static final long DEFAULT_TTLDefault TTL in minutes.- See Also:
-
DEFAULT_MAX_SIZE
public static final long DEFAULT_MAX_SIZEDefault 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
-
remove
public boolean remove -
klass
-
options
-
-
Constructor Details
-
CacheDescriptor
public CacheDescriptor()
-
-
Method Details
-
getId
Description copied from interface:Descriptor
The 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:
getId
in interfaceDescriptor
-
getTTL
public long getTTL() -
setTTL
-
merge
Description copied from interface:Descriptor
Returns a descriptor representingother
merged intothis
Default implementation returns
other
.- Specified by:
merge
in interfaceDescriptor
- Returns:
- the merged descriptor
-
doesRemove
public boolean doesRemove()Description copied from interface:Descriptor
During 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:
doesRemove
in interfaceDescriptor
-