Class StatisticsCache

  • All Implemented Interfaces:
    StorageCacheIF

    public class StatisticsCache
    extends Object
    implements 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 Detail

      • 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
    • Method Detail

      • getRegistrar

        public AccessRegistrarIF getRegistrar()
        Description copied from interface: StorageCacheIF
        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.
        Specified by:
        getRegistrar in interface StorageCacheIF
      • close

        public void close()
        Description copied from interface: StorageCacheIF
        INTERNAL: Releases all resources used by the storage cache.
        Specified by:
        close in interface StorageCacheIF
      • exists

        public boolean exists​(StorageAccessIF access,
                              IdentityIF identity)
        Description copied from interface: StorageCacheIF
        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.
        Specified by:
        exists in interface StorageCacheIF
      • getValue

        public Object getValue​(StorageAccessIF access,
                               IdentityIF identity,
                               int field)
        Description copied from interface: StorageCacheIF
        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.
        Specified by:
        getValue in interface StorageCacheIF
      • isObjectLoaded

        public boolean isObjectLoaded​(IdentityIF identity)
        Description copied from interface: StorageCacheIF
        INTERNAL: Can be called to check if the identity has been registered with the cache. The data repository will not be asked.
        Specified by:
        isObjectLoaded in interface StorageCacheIF
      • isFieldLoaded

        public boolean isFieldLoaded​(IdentityIF identity,
                                     int field)
        Description copied from interface: StorageCacheIF
        INTERNAL: Can be called to check if the specfied field has been registered with the cache. The data repository will not be asked.
        Specified by:
        isFieldLoaded in interface StorageCacheIF
      • evictFields

        public void evictFields​(IdentityIF identity,
                                boolean notifyCluster)
        Description copied from interface: StorageCacheIF
        INTERNAL: Evict all the identity's field values from the cache.
        Specified by:
        evictFields in interface StorageCacheIF
      • evictField

        public void evictField​(IdentityIF identity,
                               int field,
                               boolean notifyCluster)
        Description copied from interface: StorageCacheIF
        INTERNAL: Evict the identity's field value from the cache.
        Specified by:
        evictField in interface StorageCacheIF
      • clear

        public void clear​(boolean notifyCluster)
        Description copied from interface: StorageCacheIF
        INTERNAL: Clears the cache.
        Specified by:
        clear in interface StorageCacheIF
      • percent

        protected int percent​(int c,
                              int total)
      • dump

        public void dump()