|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<K,V>
org.compiere.util.CCache<K,V>
K - KeyV - Valuepublic class CCache<K,V>
Adempiere Cache.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
| Constructor Summary | |
|---|---|
CCache(String name,
int initialCapacity)
Adempiere Cache - expires after 2 hours |
|
CCache(String name,
int initialCapacity,
int expireMinutes)
Adempiere Cache |
|
| Method Summary | |
|---|---|
void |
addVetoableChangeListener(VetoableChangeListener listener)
Add Vetoable Change Listener |
void |
clear()
Clear cache and calculate new expiry time |
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
Set<Map.Entry<K,V>> |
entrySet()
|
V |
get(Object key)
|
int |
getExpireMinutes()
Get Expire Minutes |
String |
getName()
Get (table) Name |
boolean |
isEmpty()
|
boolean |
isReset()
Cache was reset |
Set<K> |
keySet()
|
V |
put(K key,
V value)
Put value |
void |
putAll(Map<? extends K,? extends V> m)
Put All |
void |
removeVetoableChangeListener(VetoableChangeListener listener)
Remove Vetoable Change Listener |
int |
reset()
Reset Cache |
void |
setExpireMinutes(int expireMinutes)
Set Expire Minutes and start it |
void |
setUsed()
Resets the Reset flag |
int |
size()
Get Size of Cache |
int |
sizeNoExpire()
Get Size w/o Expire |
String |
toString()
String Representation |
Collection<V> |
values()
|
| Methods inherited from class java.util.HashMap |
|---|
clone, remove |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public CCache(String name,
int initialCapacity)
name - (table) name of the cacheinitialCapacity - initial capacity
public CCache(String name,
int initialCapacity,
int expireMinutes)
name - (table) name of the cacheinitialCapacity - initial capacityexpireMinutes - expire after minutes (0=no expire)| Method Detail |
|---|
public String getName()
public void setExpireMinutes(int expireMinutes)
expireMinutes - minutes or 0public int getExpireMinutes()
public boolean isReset()
public void setUsed()
public int reset()
reset in interface CacheInterfaceCacheInterface.reset()public String toString()
toString in class AbstractMap<K,V>public void clear()
clear in interface Map<K,V>clear in class HashMap<K,V>Map.clear()public boolean containsKey(Object key)
containsKey in interface Map<K,V>containsKey in class HashMap<K,V>Map.containsKey(java.lang.Object)public boolean containsValue(Object value)
containsValue in interface Map<K,V>containsValue in class HashMap<K,V>Map.containsValue(java.lang.Object)public Set<Map.Entry<K,V>> entrySet()
entrySet in interface Map<K,V>entrySet in class HashMap<K,V>Map.entrySet()public V get(Object key)
get in interface Map<K,V>get in class HashMap<K,V>Map.get(java.lang.Object)
public V put(K key,
V value)
put in interface Map<K,V>put in class HashMap<K,V>key - keyvalue - value
public void putAll(Map<? extends K,? extends V> m)
putAll in interface Map<K,V>putAll in class HashMap<K,V>m - mappublic boolean isEmpty()
isEmpty in interface Map<K,V>isEmpty in class HashMap<K,V>Map.isEmpty()public Set<K> keySet()
keySet in interface Map<K,V>keySet in class HashMap<K,V>Map.keySet()public int size()
CacheInterface
size in interface Map<K,V>size in interface CacheInterfacesize in class HashMap<K,V>Map.size()public int sizeNoExpire()
Map.size()public Collection<V> values()
values in interface Map<K,V>values in class HashMap<K,V>Map.values()public void addVetoableChangeListener(VetoableChangeListener listener)
listener - listnerpublic void removeVetoableChangeListener(VetoableChangeListener listener)
listener - listener
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||