public class SLru extends AbstractCache
| Modifier and Type | Field and Description |
|---|---|
protected List<Object> |
m_access |
protected List<Object> |
m_accessSeg |
log4j, m_cacheMap, m_cacheMaxSize, m_evictCount| Constructor and Description |
|---|
SLru(int size,
int evictCount)
Constructor calls super constructor with same parameters.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
evict()
Evicts the 1st object form m_access list m_evictCount times
|
protected void |
hitAccess(Object key) |
protected void |
putAccess(Object key) |
List<Object> |
removeValues(Object value)
Removes all objects with the value from cache map.
|
boolean |
test()
This method should be used for testing.
|
String |
toString() |
public SLru(int size,
int evictCount)
protected void evict()
evict in class AbstractCacheprotected void hitAccess(Object key)
hitAccess in class AbstractCacheprotected void putAccess(Object key)
putAccess in class AbstractCachepublic List<Object> removeValues(Object value)
CacheInterfaceremoveValues in interface CacheInterfaceremoveValues in class AbstractCachepublic boolean test()
CacheInterfacetest in interface CacheInterfacetest in class AbstractCachepublic String toString()
toString in class AbstractCacheCopyright © 2014. All rights reserved.