Interface ILogicalResourceIdentCache

  • All Known Implementing Classes:
    LogicalResourceIdentCacheImpl

    public interface ILogicalResourceIdentCache
    An interface for a cache of logical_resource_ident records. The cache is specialized in that it supports some specific operations to process list of objects with minimal locking.
    • Method Detail

      • updateSharedMaps

        void updateSharedMaps()
        Take the records we've touched in the current thread and update the shared LRU maps.
      • resolveReferenceValues

        void resolveReferenceValues​(java.util.Collection<ResourceReferenceValueRec> referenceValues,
                                    java.util.List<ResourceReferenceValueRec> misses)
        Lookup all the database values we have cached for the given collection. Put any objects with cache misses into the corresponding miss lists (so that we know which records we need to generate inserts for)
        Parameters:
        referenceValues -
        misses - the objects we couldn't find in the cache
      • addRecord

        void addRecord​(LogicalResourceIdentKey key,
                       long id)
        Add the LogicalResourceIdent key and id to the local cache
        Parameters:
        key -
        id -
      • clearLocalMaps

        void clearLocalMaps()
        Clear any thread-local cache maps (probably because a transaction was rolled back)
      • reset

        void reset()
        Clear the thread-local and shared caches (for test purposes)
      • getLogicalResourceId

        java.lang.Long getLogicalResourceId​(int resourceTypeId,
                                            java.lang.String logicalId)
        Get the database logical_resourc_id for the given resource type and logicalId
        Parameters:
        resourceTypeId -
        logicalId -
        Returns: