Interface ItemInfoCache

  • All Known Implementing Classes:
    ItemInfoCacheImpl

    public interface ItemInfoCache
    ItemInfoCache instances are responsible for caching ItemInfos along with an opaque generation counter. Implementations are free on the particular caching policy. That is, how long (if at all) item infos are cached. An ItemInfoCache is supplied per session from the RepositoryService. It is used to cache ItemInfos read from the RepositoryService.
    See Also:
    RepositoryService.getItemInfos(SessionInfo, ItemId)
    • Method Detail

      • getNodeInfo

        ItemInfoCache.Entry<NodeInfo> getNodeInfo​(NodeId nodeId)
        Retrieve a cache entry for the given nodeId or null if no such entry is in the cache.
        Parameters:
        nodeId - id of the entry to lookup.
        Returns:
        a Entry<NodeInfo> instance or null if not found.
      • getPropertyInfo

        ItemInfoCache.Entry<PropertyInfo> getPropertyInfo​(PropertyId propertyId)
        Retrieve a cache entry for the given propertyId or null if no such entry is in the cache.
        Parameters:
        propertyId - id of the entry to lookup.
        Returns:
        a Entry<PropertyInfo> instance or null if not found.
      • put

        void put​(ItemInfo info,
                 long generation)
        Create a ItemInfoCache.Entry for info and generation and put it into the cache.
        Parameters:
        info -
        generation -
      • dispose

        void dispose()
        Clear the cache and dispose all entries.