Package net.ontopia.persistence.proxy
Class StatisticsCache
java.lang.Object
net.ontopia.persistence.proxy.StatisticsCache
- All Implemented Interfaces:
StorageCacheIF
INTERNAL: A transactional storage cache implementation. The cache
uses the transactions identity map to lookup objects and stores its
cache entries directly on the PersistentIFs.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclear(boolean notifyCluster) INTERNAL: Clears the cache.voidclose()INTERNAL: Releases all resources used by the storage cache.voiddump()voidevictField(IdentityIF identity, int field, boolean notifyCluster) INTERNAL: Evict the identity's field value from the cache.voidevictFields(IdentityIF identity, boolean notifyCluster) INTERNAL: Evict all the identity's field values from the cache.voidevictIdentity(IdentityIF identity, boolean notifyCluster) INTERNAL: Evict the identity from the cache.booleanexists(StorageAccessIF access, IdentityIF identity) INTERNAL: Can be called to verify whether the specified identity exists in the cache or in the data repository.INTERNAL: Returns the access registrar instance that is used by the storage cache.getValue(StorageAccessIF access, IdentityIF identity, int field) INTERNAL: A call forwarded by the transaction (TransactionIF) from persistent objects (PersistentIF) when the field value needs to be retrieved from storage.booleanisFieldLoaded(IdentityIF identity, int field) INTERNAL: Can be called to check if the specfied field has been registered with the cache.booleanisObjectLoaded(IdentityIF identity) INTERNAL: Can be called to check if the identity has been registered with the cache.protected intpercent(int c, int total) intprefetch(StorageAccessIF access, Class<?> type, int field, int nextField, boolean traverse, Collection<IdentityIF> identities) voidINTERNAL: Tells the cache that eviction is starting.voidINTERNAL: Deregister eviction.toString()
-
Field Details
-
total_o
protected int total_o -
total_f
protected int total_f -
hits_o
protected int hits_o -
hits_f
protected int hits_f -
misses_o
protected int misses_o -
misses_f
protected int misses_f -
dump_interval
protected int dump_interval -
name
-
pcache
-
-
Method Details
-
getRegistrar
Description copied from interface:StorageCacheIFINTERNAL: Returns the access registrar instance that is used by the storage cache. If it does not need an access registrar, or it does not have one, null is returned.- Specified by:
getRegistrarin interfaceStorageCacheIF
-
close
public void close()Description copied from interface:StorageCacheIFINTERNAL: Releases all resources used by the storage cache.- Specified by:
closein interfaceStorageCacheIF
-
exists
Description copied from interface:StorageCacheIFINTERNAL: Can be called to verify whether the specified identity exists in the cache or in the data repository. Whether the data repository is actually asked depends on the policy of the storage cache.- Specified by:
existsin interfaceStorageCacheIF
-
getValue
Description copied from interface:StorageCacheIFINTERNAL: A call forwarded by the transaction (TransactionIF) from persistent objects (PersistentIF) when the field value needs to be retrieved from storage. The field value will be returned.- Specified by:
getValuein interfaceStorageCacheIF
-
isObjectLoaded
Description copied from interface:StorageCacheIFINTERNAL: Can be called to check if the identity has been registered with the cache. The data repository will not be asked.- Specified by:
isObjectLoadedin interfaceStorageCacheIF
-
isFieldLoaded
Description copied from interface:StorageCacheIFINTERNAL: Can be called to check if the specfied field has been registered with the cache. The data repository will not be asked.- Specified by:
isFieldLoadedin interfaceStorageCacheIF
-
registerEviction
public void registerEviction()Description copied from interface:StorageCacheIFINTERNAL: Tells the cache that eviction is starting.- Specified by:
registerEvictionin interfaceStorageCacheIF
-
releaseEviction
public void releaseEviction()Description copied from interface:StorageCacheIFINTERNAL: Deregister eviction.- Specified by:
releaseEvictionin interfaceStorageCacheIF
-
evictIdentity
Description copied from interface:StorageCacheIFINTERNAL: Evict the identity from the cache.- Specified by:
evictIdentityin interfaceStorageCacheIF
-
evictFields
Description copied from interface:StorageCacheIFINTERNAL: Evict all the identity's field values from the cache.- Specified by:
evictFieldsin interfaceStorageCacheIF
-
evictField
Description copied from interface:StorageCacheIFINTERNAL: Evict the identity's field value from the cache.- Specified by:
evictFieldin interfaceStorageCacheIF
-
clear
public void clear(boolean notifyCluster) Description copied from interface:StorageCacheIFINTERNAL: Clears the cache.- Specified by:
clearin interfaceStorageCacheIF
-
prefetch
public int prefetch(StorageAccessIF access, Class<?> type, int field, int nextField, boolean traverse, Collection<IdentityIF> identities) - Specified by:
prefetchin interfaceStorageCacheIF
-
percent
protected int percent(int c, int total) -
dump
public void dump() -
toString
-