|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectAbstractHelper
com.basecmp.core.persistence.impl.AssetCacheMgr
Object-cache for instances of PersistentAsset. AssetCacheMgr is implemented as a singleton and provides read-access to the cache via static method get(). The cache itself is backed by an LRU-Map (Apache Commons Collection) and is fully event-controlled. The private contructor is called via a "static contructor" and registers itself for the persistence-eventtypes ReadEvent, SaveEvent, DeleteEvent and BindingEvent. AssetCacheMgr is currently disabled by default. Caching can be enabled with the Config-Variable 'persistence.assethandling.enableCache' set 'true' in system-configfile. The cachesize is currently limited to 5000 instances. AssetCacheMgr is used by PersistentAssetFactory to provide transparent object-caching. Other classes may use the cache but this is not recommended.
| Field Summary | |
static int |
CACHECONTROL_ADD
|
static int |
CACHECONTROL_DROP
|
static int |
CACHECONTROL_UPDATE
|
static int |
DEFAULT_MAX_CACHE_SIZE
|
| Method Summary | |
static boolean |
contains(java.lang.Long cid)
|
protected static int |
currentReferenceNavigationMapSize()
|
protected static int |
currentReferenceNavigationSize()
|
static int |
currentSize()
|
static void |
flushAll()
|
static PersistentAsset |
get(java.lang.Long cid)
Delivers an instance of PersistentAsset from the Object-Cache or null, if the asset with the given cid is not present in the object-cache. |
static int[] |
getStats()
Returns runtime-statistics of the cache-manager of the running measuring internval. |
static boolean |
isActive()
|
protected void |
load()
Empty implementation. |
static int |
maxSize()
|
void |
processEvent(java.util.EventObject event)
Processes the events sent by persistence-layer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int CACHECONTROL_ADD
public static final int CACHECONTROL_DROP
public static final int CACHECONTROL_UPDATE
public static final int DEFAULT_MAX_CACHE_SIZE
| Method Detail |
public static boolean contains(java.lang.Long cid)
protected static int currentReferenceNavigationMapSize()
protected static int currentReferenceNavigationSize()
public static int currentSize()
public static void flushAll()
public static PersistentAsset get(java.lang.Long cid)
public static int[] getStats()
public static boolean isActive()
protected void load()
public static int maxSize()
public void processEvent(java.util.EventObject event)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||