|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.wurfl.core.cache.DoubleLRUMapCacheProvider
public class DoubleLRUMapCacheProvider
CacheProvider LRUMap implementation.
The cached items are stored using LRUMap. LRUMap is a map using LRU algorithm to evict items.
| Field Summary |
|---|
| Fields inherited from interface net.sourceforge.wurfl.core.cache.CacheProvider |
|---|
logger |
| Constructor Summary | |
|---|---|
DoubleLRUMapCacheProvider()
Default constructor. |
|
DoubleLRUMapCacheProvider(int maxSizeUA,
int maxSizeDevice)
Constructor by maxSize parameters. |
|
DoubleLRUMapCacheProvider(int maxSizeUA,
int maxSizeDevice,
boolean scanUntilRemovable)
Constructor by LRUMap parameters. |
|
| Method Summary | |
|---|---|
void |
clear()
Remove all items from cache. |
Device |
getDevice(String key)
Returns the cached item. |
Device |
getDeviceFromDeviceId(String deviceId)
Returns the cached device, from the deviceId. |
void |
putDevice(String key,
Device value)
Put an item in cache associated to a key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DoubleLRUMapCacheProvider(int maxSizeUA,
int maxSizeDevice,
boolean scanUntilRemovable)
maxSizeUA - The max size of cached UAs.maxSixeDevice - The max size of cached DevicesscanUntilRemovable - scan until a removeable entry is found, default false.LRUMap.LRUMap(int, boolean)
public DoubleLRUMapCacheProvider(int maxSizeUA,
int maxSizeDevice)
maxSizeUA - The max size of cached UAs.maxSixeDevice - The max size of cached DevicesLRUMap.LRUMap(int)public DoubleLRUMapCacheProvider()
| Method Detail |
|---|
public void clear()
CacheProvider
clear in interface CacheProviderpublic Device getDevice(String key)
CacheProvider
getDevice in interface CacheProviderkey - The cached item key.
public void putDevice(String key,
Device value)
CacheProvider
putDevice in interface CacheProviderkey - The caching item key.value - The caching item.public Device getDeviceFromDeviceId(String deviceId)
CacheProvider
getDeviceFromDeviceId in interface CacheProvider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||