Class CacheDefinition
- java.lang.Object
-
- io.vertigo.core.node.definition.AbstractDefinition
-
- io.vertigo.datastore.cache.definitions.CacheDefinition
-
- All Implemented Interfaces:
io.vertigo.core.node.definition.Definition
public final class CacheDefinition extends io.vertigo.core.node.definition.AbstractDefinitionThe cache definition defines the configuration of a cache. This definition - has a name; - and 3 params that define the strategy of caching - max elements in memory - time to live - time to idle- Author:
- pchretien
-
-
Constructor Summary
Constructors Constructor Description CacheDefinition(String name, boolean serializeElements, int maxElementsInMemory, int timeToLiveSeconds, int timeToIdleSeconds, boolean isReloadedByList)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMaxElementsInMemory()intgetTimeToIdleSeconds()intgetTimeToLiveSeconds()booleanisReloadedByList()booleanshouldSerializeElements()
-
-
-
Field Detail
-
PREFIX
public static final String PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CacheDefinition
public CacheDefinition(String name, boolean serializeElements, int maxElementsInMemory, int timeToLiveSeconds, int timeToIdleSeconds, boolean isReloadedByList)
Constructor.- Parameters:
name- the name of the cacheserializeElements- If elements are serializedmaxElementsInMemory- Max elements stored in memorytimeToLiveSeconds- Time to live (in seconds)timeToIdleSeconds- Time to live when idle (in seconds)
-
-
Method Detail
-
shouldSerializeElements
public boolean shouldSerializeElements()
- Returns:
- elements should be serialized
-
getMaxElementsInMemory
public int getMaxElementsInMemory()
- Returns:
- Max elements stored in memory
-
getTimeToLiveSeconds
public int getTimeToLiveSeconds()
- Returns:
- Time to live (in seconds)
-
getTimeToIdleSeconds
public int getTimeToIdleSeconds()
- Returns:
- Time tio idle (in seconds)
-
isReloadedByList
public boolean isReloadedByList()
-
-