Package org.compiere.util
Class CacheMgt
java.lang.Object
org.compiere.util.CacheMgt
iDempiere global Cache Manager
- Version:
- $Id: CacheMgt.java,v 1.2 2006/07/30 00:54:35 jjanke Exp $
- Author:
- Jorg Janke
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CacheMgt
get()
Get global Cache Managerint
Total Cached Elementsboolean
Is there a cache for this table name?protected void
localNewRecord
(String tableName, int Record_ID) Reset local Cachevoid
<K,
V> Map<K, V> Register new CCache Instance.
This is use byCCache
and developer usually shouldn't use this class directly.int
reset()
do a cluster wide cache resetint
do a cluster wide cache reset for tableNameint
do a cluster wide cache reset for tableName with recordId keyint
Reset local Cacheprotected int
resetLocalCache
(String tableName, int Record_ID) Reset local CachetoString()
String RepresentationExtended String Representationboolean
unregister
(CacheInterface instance) Un-Register Cache Instance
-
Field Details
-
MAX_SIZE
public static int MAX_SIZEDefault maximum cache size
-
-
Method Details
-
get
Get global Cache Manager- Returns:
- Cache Manager
-
register
Register new CCache Instance.
This is use byCCache
and developer usually shouldn't use this class directly.- Parameters:
instance
- Cachedistributed
-- Returns:
- map for CCache
-
unregister
Un-Register Cache Instance- Parameters:
instance
- Cache- Returns:
- true if removed
-
reset
public int reset()do a cluster wide cache reset- Returns:
- number of deleted cache entries
-
reset
do a cluster wide cache reset for tableName- Parameters:
tableName
- table name- Returns:
- number of deleted cache entries
-
reset
do a cluster wide cache reset for tableName with recordId key- Parameters:
tableName
-Record_ID
- record id for the cache entries to delete. pass -1 if you don't want to delete cache entries by record id- Returns:
- number of deleted cache entries
-
resetLocalCache
public int resetLocalCache()Reset local Cache- Returns:
- number of deleted cache entries
-
getInstancesAsArray
- Returns:
- cache instances
-
resetLocalCache
Reset local Cache- Parameters:
tableName
- table nameRecord_ID
- record if applicable or 0 for all- Returns:
- number of deleted cache entries
-
localNewRecord
Reset local Cache- Parameters:
tableName
- table nameRecord_ID
- record if applicable or 0 for all
-
getElementCount
public int getElementCount()Total Cached Elements- Returns:
- count
-
toString
String Representation -
toStringX
Extended String Representation- Returns:
- info
-
newRecord
-
getCacheInfos
- Returns:
- cache infos
-
hasCache
Is there a cache for this table name?- Parameters:
tableName
-- Returns:
- boolean
-