Class SharedCache

    • Field Detail

      • current_ticket_value

        protected long current_ticket_value
      • current_ticket

        protected TicketIF current_ticket
      • eviction

        protected int eviction
      • timestamp

        protected long timestamp
    • Method Detail

      • setCluster

        public void setCluster​(ClusterIF cluster)
      • 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
      • createIdentity

        public IdentityIF createIdentity​(Class<?> type,
                                         long key)
        Description copied from interface: AccessRegistrarIF
        INTERNAL: Factory method for creating new identity objects. Key is guaranteed to have a width of 1 and key value which a Long.
        Specified by:
        createIdentity in interface AccessRegistrarIF
      • getTicket

        public TicketIF getTicket()
        Description copied from interface: AccessRegistrarIF
        INTERNAL: Get ticket that should be used as first argument to register methods. The ticket is used figure out if value should be registered or not.
        Specified by:
        getTicket in interface AccessRegistrarIF
      • getFieldsCount

        protected int getFieldsCount​(Class<?> type)
      • clear

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