Package com.j_spaces.map.eviction
Class NoneEvictionStrategy
java.lang.Object
com.j_spaces.map.eviction.AbstractEvictionStrategy
com.j_spaces.map.eviction.NoneEvictionStrategy
- All Implemented Interfaces:
EvictionStrategy
No eviction strategy
- Since:
- 5.0
- Version:
- 1.0
- Author:
- Guy Korland
-
Field Summary
Fields inherited from class com.j_spaces.map.eviction.AbstractEvictionStrategy
_batchSize -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear EvictionStrategy internal structures only and doesn't clear cache.createEntry(Object key, Object value, long ttl, int version) Creates new CacheEntry for the Cache and probably saves the entry in the internal structures.voiddiscardEntry(CacheEntry entry) Discard an Entry from the EvictionStrategy internal structures.intEvicts batch of CacheEntry from the Cache according to the eviction strategy.voidtouchEntry(CacheEntry entry) Informs the eviction strategy on a CacheEntry use.Methods inherited from class com.j_spaces.map.eviction.AbstractEvictionStrategy
setBatchSize
-
Constructor Details
-
NoneEvictionStrategy
public NoneEvictionStrategy()
-
-
Method Details
-
clear
public void clear()Clear EvictionStrategy internal structures only and doesn't clear cache. -
discardEntry
Discard an Entry from the EvictionStrategy internal structures.- Parameters:
entry- the entry to discard from the eviction strategy internal structures
-
evict
Evicts batch of CacheEntry from the Cache according to the eviction strategy.- Parameters:
cache- the cache to be evicted- Returns:
- the amount of entries evicted
-
touchEntry
Informs the eviction strategy on a CacheEntry use.- Parameters:
entry- the touched entry
-
createEntry
Creates new CacheEntry for the Cache and probably saves the entry in the internal structures.- Parameters:
key- the entry keyvalue- the entry valuettl- the time to keep the entry in cacheversion- the entry version- Returns:
- a CacheEntry that holds all the parameters and probably saved in the eviction strategy internal structures
-