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 long
DEFAULT_MAX_SIZE
Default max sizestatic 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
-
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 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 representingother
merged intothis
void
setTTL(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: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
public void setTTL(Long value)
-
merge
public Descriptor merge(Descriptor o)
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
-
-