Package net.ontopia.persistence.proxy
Interface StorageCacheIF
- All Known Implementing Classes:
AbstractLocalCache,ROLocalCache,RWLocalCache,SharedCache,StatisticsCache
public interface StorageCacheIF
INTERNAL: Interface used by the transaction to get hold of objects
and object field values. Implementations of this interface are free
do quite a lot of optimizations when it comes to memory handling
and data repository access.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear(boolean notifyCluster) INTERNAL: Clears the cache.voidclose()INTERNAL: Releases all resources used by the storage cache.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.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.
-
Method Details
-
exists
INTERNAL: 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. -
getValue
Object getValue(StorageAccessIF access, IdentityIF identity, int field) throws IdentityNotFoundException INTERNAL: 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.- Throws:
IdentityNotFoundException- if the identity was not found.
-
isObjectLoaded
INTERNAL: Can be called to check if the identity has been registered with the cache. The data repository will not be asked. -
isFieldLoaded
INTERNAL: Can be called to check if the specfied field has been registered with the cache. The data repository will not be asked. -
registerEviction
void registerEviction()INTERNAL: Tells the cache that eviction is starting. -
releaseEviction
void releaseEviction()INTERNAL: Deregister eviction. -
evictIdentity
INTERNAL: Evict the identity from the cache. -
evictFields
INTERNAL: Evict all the identity's field values from the cache. -
evictField
INTERNAL: Evict the identity's field value from the cache. -
clear
void clear(boolean notifyCluster) INTERNAL: Clears the cache. -
prefetch
int prefetch(StorageAccessIF access, Class<?> type, int field, int nextField, boolean traverse, Collection<IdentityIF> identities) -
getRegistrar
AccessRegistrarIF getRegistrar()INTERNAL: 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. -
close
void close()INTERNAL: Releases all resources used by the storage cache.
-