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 Type
    Method
    Description
    void
    clear(boolean notifyCluster)
    INTERNAL: Clears the cache.
    void
    INTERNAL: Releases all resources used by the storage cache.
    void
    evictField(IdentityIF identity, int field, boolean notifyCluster)
    INTERNAL: Evict the identity's field value from the cache.
    void
    evictFields(IdentityIF identity, boolean notifyCluster)
    INTERNAL: Evict all the identity's field values from the cache.
    void
    evictIdentity(IdentityIF identity, boolean notifyCluster)
    INTERNAL: Evict the identity from the cache.
    boolean
    exists(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.
    boolean
    isFieldLoaded(IdentityIF identity, int field)
    INTERNAL: Can be called to check if the specfied field has been registered with the cache.
    boolean
    INTERNAL: Can be called to check if the identity has been registered with the cache.
    int
    prefetch(StorageAccessIF access, Class<?> type, int field, int nextField, boolean traverse, Collection<IdentityIF> identities)
     
    void
    INTERNAL: Tells the cache that eviction is starting.
    void
    INTERNAL: Deregister eviction.
  • Method Details

    • exists

      boolean exists(StorageAccessIF access, IdentityIF identity)
      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

      boolean isObjectLoaded(IdentityIF identity)
      INTERNAL: Can be called to check if the identity has been registered with the cache. The data repository will not be asked.
    • isFieldLoaded

      boolean isFieldLoaded(IdentityIF identity, int field)
      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

      void evictIdentity(IdentityIF identity, boolean notifyCluster)
      INTERNAL: Evict the identity from the cache.
    • evictFields

      void evictFields(IdentityIF identity, boolean notifyCluster)
      INTERNAL: Evict all the identity's field values from the cache.
    • evictField

      void evictField(IdentityIF identity, int field, boolean notifyCluster)
      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.