|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Deprecated public interface EvictionStrategy
EvictionStrategy decides which entry to evict when the cache reaches its limits. The eviction strategy acts as a CacheEntry factory, this way if the cache has a new element inserted then the eviction strategy would be informed of such an operation and can keep track of the state of the cache. In order to keep track of the entries use the cache informs the eviction strategy on each use ("touch") of a CacheEntry.
Method Summary | |
---|---|
void |
clear()
Deprecated. Clear EvictionStrategy internal structures only and doesn't clear cache. |
CacheEntry |
createEntry(Object key,
Object value,
long ttl,
int version)
Deprecated. Creates new CacheEntry for the Cache and probably saves the entry in the internal structures. |
void |
discardEntry(CacheEntry entry)
Deprecated. Discard an Entry from the EvictionStrategy internal structures. |
int |
evict(Cache cache)
Deprecated. Evicts batch of CacheEntry from the Cache according to the eviction strategy. |
void |
touchEntry(CacheEntry entry)
Deprecated. Informs the eviction strategy on a CacheEntry use. |
Method Detail |
---|
void clear()
CacheEntry createEntry(Object key, Object value, long ttl, int version)
key
- the entry keyvalue
- the entry valuettl
- the time to keep the entry in cacheversion
- the entry version
void discardEntry(CacheEntry entry)
entry
- the entry to discard from the eviction strategy internal structuresint evict(Cache cache)
cache
- the cache to be evicted
void touchEntry(CacheEntry entry)
entry
- the touched entry
|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |