|
||||||||||
| 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.
The items are cached by mean of HashMap, they never evict.
| 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. |
protected Map |
createCache()
Factory method to create cache Map. |
Object |
get(Object key)
Returns the cached item. |
int |
getConcurrentWrites()
Return the maximum threads can write the cache. |
int |
getInitialCapacity()
Return the initial capacity of the hashMap. |
float |
getLoadFactor()
Return the hashMap load factor. |
void |
put(Object key,
Object 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)
The - initial capacity of HashMap.ConcurrentHashMap.ConcurrentHashMap(int).
public HashMapCacheProvider(int initialCapacity,
float loadFactor)
initialCapacity - The hashMap initial capacity.loadFactor - The hashMap load factor.ConcurrentHashMap.ConcurrentHashMap(int, float).
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.ConcurrentHashMap.ConcurrentHashMap(int, float, int).| Method Detail |
|---|
public int getInitialCapacity()
ConcurrentHashMap.ConcurrentHashMap(int, float, int)public float getLoadFactor()
ConcurrentHashMap.ConcurrentHashMap(int, float, int)public int getConcurrentWrites()
ConcurrentHashMap.ConcurrentHashMap(int, float, int)public void clear()
clear in interface CacheProviderpublic Object get(Object key)
get in interface CacheProviderkey - The cached item key.
public void put(Object key,
Object target)
put in interface CacheProviderkey - The caching item key.target - The caching item.protected Map createCache()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||