|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.wurfl.core.cache.HashMapCacheProvider
public class HashMapCacheProvider
CacheProvider HashMap implementation.
| Constructor Summary | |
|---|---|
HashMapCacheProvider()
Default constructor |
|
HashMapCacheProvider(int initialCapacity)
Constructor by the initial capacity. |
|
HashMapCacheProvider(int initialCapacity,
float loadFactor)
Constructor by the initial capacity and load factor. |
|
HashMapCacheProvider(int initialCapacity,
float loadFactor,
int concurrentWrites)
Constructor by the initial capacity, loadFactor and maximum concurrent writes |
|
| Method Summary | |
|---|---|
void |
clear()
Remove all items from cache. |
int |
getConcurrentWrites()
Return the maximum threads can write the cache. |
Device |
getDevice(String key)
Returns the cached item. |
Device |
getDeviceFromDeviceId(String deviceId)
Returns the cached device, from the deviceId. |
int |
getInitialCapacity()
Return the initial capacity of the hashMap. |
float |
getLoadFactor()
Return the hashMap load factor. |
void |
putDevice(String key,
Device target)
Put an item in cache associated to a key. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HashMapCacheProvider()
public HashMapCacheProvider(int initialCapacity)
initialCapacity -
public HashMapCacheProvider(int initialCapacity,
float loadFactor)
initialCapacity - The hashMap initial capacity.loadFactor - The hashMap load factor.
public HashMapCacheProvider(int initialCapacity,
float loadFactor,
int concurrentWrites)
initialCapacity - The hashMap initial capacity.loadFactor - The hashMap load factor.concurrentWrites - The maximum thread can write the cache.| Method Detail |
|---|
public int getInitialCapacity()
public float getLoadFactor()
public int getConcurrentWrites()
public void clear()
clear in interface CacheProviderpublic Device getDevice(String key)
getDevice in interface CacheProviderkey - The cached item key.
public void putDevice(String key,
Device target)
putDevice in interface CacheProviderkey - The caching item key.target - The caching item.public String toString()
toString in class Objectpublic 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 | |||||||||