Class RandomCache
java.lang.Object
NetStrategies.CacheStrategy
NetStrategies.CacheStrategies.RandomCache
- All Implemented Interfaces:
AutoCheck
Random cache eviction strategy: removes a uniformly chosen item from the cached item list.
-
Field Summary
Fields inherited from class CacheStrategy
engine, netSystem, removeItemMode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRemoveItem(LinkedList<CacheItem> caches) For RandomCache is to randomly choose a cache item in the cached items list.Methods inherited from class CacheStrategy
check, getRemoveItemMode, setNetSystem, setRandomEngine, setRemoveItemMode
-
Constructor Details
-
RandomCache
public RandomCache()
-
-
Method Details
-
getRemoveItem
For RandomCache is to randomly choose a cache item in the cached items list.- Specified by:
getRemoveItemin classCacheStrategy- Parameters:
caches- the list of the cached items.- Returns:
-